Hi, Any command or means to delete a director which is not empty
rmdir or similar
iam using Sun Solaries 2.6
I have many full directories with subdirectories and I can not go on emptying them all
Hi, Any command or means to delete a director which is not empty
rmdir or similar
iam using Sun Solaries 2.6
I have many full directories with subdirectories and I can not go on emptying them all
Did you try reading the man pages of rm ?
There must be something which documents the option -r and -f
rm is for removing files only. For directory it is rmdir and it can not remove non empty directory
This is what I got
$ ls -R dir1
dir1:
dir2
dir1/dir2:
file1 file2
$ rm -rf dir1
$ ls -l dir1
dir1: No such file or directory
$
And uname -a is
SunOS xxxxxxxx 5.8 Generic_108528-29 sun4u sparc SUNW,Ultra-250
Man simply use: rm -r directory name
just use rm -r will help you to remove the files and directory