If you can see this check that

next section prev section up prev page next page

Removing Directories

Once you have several directories in use, you will need to maintain your hierarchy. This will involve removing directories as well as other activities. The rmdir command lets you remove directories. However Unix will not remove a directory that is not empty, so you must first move or remove any files or subdirectories within the directory you want to remove.

The rm command has a recursive option -r that will remove a directory, and any of its subdirectories and files. It should however be used with extreme caution, as it allows in a single command the ability to quickly remove all files you have access to! Many people believe that it is good practice to never use rm -r without also using -i (interactive). The command 'rm -ri' will ask you to confirm each file or directory which is going to be deleted before the deletion is carried out.


Linux tutorials: intro1 intro2 wildcard permission pipe vi essential admin net SELinux1 SELinux2 fwall DNS diag Apache1 Apache2 Mail
Caine 6.0: Essentials | Basic | Search | SysIntro | 5a | 5b | 5c | 6 | 7a | 7b | 8a | 8b | WebBrowserA | WebBrowserB | Registry | Browser
Digital Investigation: Editing | Email | Logs | Strength
Kali: 1a | 1b | 1c | 2 | 3 | 4a | 4b | 5 | 6 | 7a | 8a | 8b | 9 | 10 |
Useful: Quiz | Forums | Privacy Policy | Terms and Conditions
Site Links:XMLZoo ActiveSQL ProgZoo SQLZoo

Linuxzoo created by Gordon Russell.
@ Copyright 2004-2017 Edinburgh Napier University