![]() If the subdirectory mydir exists in your currentĭirectory and it is not empty, you can delete it by entering at theįor more information on the rmdir and the rm -rĬommands, see their man pages. If you don't use this command veryĬautiously, you risk deleting all or most of your files. Very careful with this command, because using the rm -rĬommand will delete not only everything in the named directory, but alsoĮverything in its subdirectories. With the -r option for recursive deletion. To remove a directory that is not empty, use the rm command To delete it, you will see an error message. If the directory is not empty or you do not have permission If mydir exists, and is an empty directory, it will be ![]() In your current working directory, at the Unix prompt, ![]() ForĮxample, to remove a subdirectory named mydir that exists To remove a directory that you own, use the rmdir command. Information here may no longer be accurate, and links may no longer be available or reliable. This content has been archived, and is no longer maintained by Indiana University. By adding the -r (recursive) option to the rm command in Linux, you can delete a directory and all its contents (files, subdirectories, etc.).
0 Comments
Leave a Reply. |