Results 1 to 7 of 7

Thread: What is the opposite of mkdir?

  1. #1
    Join Date
    Jul 2009
    Beans
    224
    Distro
    Xubuntu 13.04 Raring Ringtail

    What is the opposite of mkdir?

    Hi there:

    I recently created, via terminal, a new folder named "old", but now is not needed anymore. If I created it with:

    Code:
    hihihi100@hihihi100-laptop:/media/Volume 1$ sudo mkdir ./old
    what do I have to type to delete the folder?

    Cheers

  2. #2
    Join Date
    Nov 2005
    Beans
    522
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: What is the opposite of mkdir?

    I believe 'rmdir' will do what you want.

  3. #3
    Join Date
    Nov 2007
    Location
    Les Gets, France
    Beans
    744
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: What is the opposite of mkdir?

    Hi

    Use rmdir. Have a look at
    man rmdir
    before you use it.
    Acer Aspire 1353 mint 13 maya xfce (32 bit)
    Toshiba A200 Ubuntu 14.04 (64 bit)
    Asus EeePC 1011PX Chromixium 1.5 (32 bit)

  4. #4
    Join Date
    Jul 2009
    Beans
    224
    Distro
    Xubuntu 13.04 Raring Ringtail

    Re: What is the opposite of mkdir?

    That seems to work, but Im gonna need more help:

    Code:
    hihihi100@hihihi100-laptop:~$ cd /media/Volume\ 1
    hihihi100@hihihi100-laptop:/media/Volume 1$ sudo rmdir ./old
    [sudo] password for hihihi100: 
    rmdir: failed to remove `./old': Directory not empty
    hihihi100@hihihi100-laptop:/media/Volume 1$
    Directory not empty: I have accessed the Volume \1 as I would access any external hard drive (mount, click on the icon), and tried to delete all the content of the folder, even right clicking on it to change its permissions, to not avail I always get:

    Code:
    Cannot move file to trash, do you want to delete immediately?
    The file "hihihi100" cannot be moved to the trash.
    details:
    Unable to trash file: Permission denied
    Help please

    OK, it seems my question has to do with
    Code:
    --ignore-fail-on-non-empty
    
                  ignore each failure that is solely because a directory
    
                  is non-empty
    But I dont know what to type

    So, help please...

    cheers
    Last edited by hihihi100; March 29th, 2010 at 07:29 PM.

  5. #5
    Join Date
    Oct 2006
    Location
    Milton Keynes, UK
    Beans
    1,141
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: What is the opposite of mkdir?

    OK, it seems my question has to do with

    Code:
    --ignore-fail-on-non-empty
    
                  ignore each failure that is solely because a directory
    
                  is non-empty

    But I dont know what to type
    Try this

    Code:
    sudo rmdir --ignore-fail-on-non-empty ./old
    Linux Registered User #443947 Ubuntu Regestered User #12604

    Hakunamatata ...... No worries !

  6. #6
    Join Date
    Jul 2009
    Beans
    224
    Distro
    Xubuntu 13.04 Raring Ringtail

    Re: What is the opposite of mkdir?

    I think that didnt work either:

    Code:
    hihihi100@hihihi100-laptop:~$ cd /media/Volume\ 1
    hihihi100@hihihi100-laptop:/media/Volume 1$ sudo rmdir --ignore-fail-on-non-empty ./old
    [sudo] password for hihihi100: 
    hihihi100@hihihi100-laptop:
    I was prompted to type my password, but nothing happened, I can still see the non needed folder..

  7. #7
    Join Date
    Jul 2009
    Beans
    224
    Distro
    Xubuntu 13.04 Raring Ringtail

    Re: What is the opposite of mkdir?

    Well, it wasnt that difficult after all, but not via terminal:

    I just opened the folder as administrator and deleted it

    Cya

Tags for this Thread

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
  •