Results 1 to 5 of 5

Thread: /media folder contents

  1. #1
    Join Date
    Jun 2008
    Beans
    87
    Distro
    Ubuntu

    /media folder contents

    Hello,

    Once I tried to open my USB stick on ubuntu, but it didn't work, and I found some guide to create folders in /media so it might work. However, I don't need it anymore, and I don't know how to remove them. It looks displayed in thumbnail. Is there any way I could remove usb1, usb2, usb3, ubuntu8 and ubuntu-8.10-desktop-i386.iso?

    TY
    Attached Images Attached Images
    Linux Fan.

  2. #2
    Join Date
    Oct 2007
    Location
    Cleveland, OH
    Beans
    10
    Distro
    Ubuntu

    Re: /media folder contents

    Yes you can.

    If you go to a Terminal (Applications | Accessories | Terminal) and navigate to the media directory:

    Code:
    cd /media
    then remove the folders with su permissions:

    Code:
    sudo rmdir usb1 usb2 usb3
    It will prompt for a password and you should be all set.

  3. #3
    Join Date
    May 2010
    Beans
    108
    Distro
    Xubuntu

    Re: /media folder contents

    If there are "files" inside the "directories," you may need to resort to:
    Code:
    rm -rf usb1 usb2 usb3
    I'll take you out for a meal with Mr and Mrs. Pain. Order up some violent quiche.

  4. #4
    Join Date
    Mar 2008
    Location
    England
    Beans
    Hidden!
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: /media folder contents

    Quote Originally Posted by ThesaurusRex View Post
    If there are "files" inside the "directories," you may need to resort to:
    Code:
    rm -rf usb1 usb2 usb3
    Though not if your USB disk is mounted.

    Try:

    Code:
    for i in /media/usb*; do mountpoint $i || sudo rm -rv $i; done
    Just remember to be careful with rm -rv when running as root.
    My Website. Computing resources, photos, articles etc.

  5. #5
    Join Date
    Dec 2007
    Location
    Idaho
    Beans
    4,976
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: /media folder contents

    That's why you should just use rmdir, I don't think the op wants to remove them if they have files in them. safer is always better.
    "You can't expect to hold supreme executive power just because some watery tart lobbed a sword at you"

    "Don't let your mind wander -- it's too little to be let out alone."

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •