Ubuntu Delete Folders and Files via Terminal and Nautilus

How to Delete Folders and Files on Ubuntu-Linux via Terminal and Nautilus with root permission
by: Revengksky Joseph D. Reyes (a.k.a rjdreyes – jcyberinux.com)

For some point, you need to delete folders or files from one hard drive to another, but couldn’t transfer due to unknown error or administration permission, and also deleting them causing you some problem. Maybe this tip can help you.

1. To delete certain files or folders via Nautilus, Press Alt+F2 and type the command: gksu nautilus then press Enter to run the command.

Ubuntu 10.04 LTS
Ubuntu Delete Folders and Files via Terminal and Nautilus
Ubuntu 12.04 LTS
Ubuntu Delete Folders and Files via Terminal and Nautilus

(Note: It will ask for an administration password, or your own account password, type it and press enter key.)

Then from there, you can simply delete the folder you want without worrying about root permissions.

2. Another thing to delete the folders or files is by via Terminal, type the following command on terminal: sudo rm -r -f foldername or filename

Ubuntu Delete Folders and Files via Terminal and Nautilus
(Note: It will ask for an administration password, or your own account password, type it and press enter key. Deleting certain files/folders is case sensitive, for example, MYFOLDER is different from myfolder, that’s how linux works.)

rm is the command to delete certain files or folder. You can see more functions on rm by typing rm –help on the terminal.

Usage: rm [OPTION]… FILE…
Remove (unlink) the FILE(s).
-f, –force ignore nonexistent files, never prompt
-i prompt before every removal
-I prompt once before removing more than three files, or
when removing recursively. Less intrusive than -i
while still giving protection against most mistakes
–interactive[=WHEN] prompt according to WHEN: never, once (-I), or
always (-i). Without WHEN, prompt always
–one-file-system when removing a hierarchy recursively, skip any
directory that is on a file system different from
that of the corresponding command line argument
–no-preserve-root do not treat `/’ specially
–preserve-root do not remove `/’ (default)
-r, -R, –recursive remove directories and their contents recursively
-v, –verbose explain what is being done
–help display this help and exit
–version output version information and exit
By default, rm does not remove directories. Use the –recursive (-r or -R)
option to remove each listed directory, too, along with all of its contents.
To remove a file whose name starts with a `-’, for example `-foo’,
use one of these commands:
rm — -foo or rm ./-foo
Note that if you use rm to remove a file, it might be possible to recover
some of its contents, given sufficient expertise and/or time.
For greater assurance that the contents are truly unrecoverable, consider
using shred.

Please share for any additional information here in our comment. Cheers! :D

(Note: Ubuntu(Unity, Gnome and Applications) Logo/Images/Pictures has a respective copyright. I used it for demonstration purpose only.)

Related Entries / Links / Sources / Articles / Sources:
Ubuntu Official Site

Related Posts Plugin for WordPress, Blogger...
Share

4 comments

  1. michael kors says:

    You are a very bright person!

  2. Amedar says:

    Keep working ,terrific job!

  3. Stephani says:

    Thanks to this web site I opened my thoughts.

  4. Caleb says:

    Great blog! I am loving it!! Will come again. I am taking your feeds also