Development Blog by Professionals
Delete / Remove a Directory Linux Command
$ rmdir /tmp/docs
If directory is not empty you will get an error:
$ rmdir letters
Output:
rmdir: letters: Directory not empty
You can change directory to find out files:
$ cd letters
$ ls
Linux remove entire directory
To remove all directories and subdirectories use rm command. For example remove letters and all subdirectories and files inside this directory, type the following command:
$ rm -rf letters/
| Print article | This entry was posted by admin on February 8, 2010 at 12:55, and is filed under Linux. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |


