MBC
11-04-2002, 12:00 PM
I have a few files stuck on my server. Is there a super user delete command that will kill a directory and everything in it? If I try and delete the files one by one it says they are in use? I do have root access.
![]() | View Full Version : Delete command? MBC 11-04-2002, 12:00 PM I have a few files stuck on my server. Is there a super user delete command that will kill a directory and everything in it? If I try and delete the files one by one it says they are in use? I do have root access. tazzy 11-04-2002, 12:02 PM Whats the directory you want to delete? CipherVendor 11-04-2002, 12:23 PM rm -rf /path/to/dir/ tazzy 11-04-2002, 12:26 PM Originally posted by CipherVendor rm -rf /path/to/dir/ Hello, rmdir /path/to/dir/ is the correct command to remove a directory. But "rm -rf /path/to/dir/" works also :D MBC 11-04-2002, 01:58 PM Thanks the rm -rf worked, the standard rmdir wouldn't work I had tried that. Lagniappe-labgeek 11-04-2002, 02:08 PM In most implementations of unix I've seen rmdir requires an empty directory. Which is probably why it didn't work. rm with -r (recursive) and -f (force - ie no prompting) is required when files or subdirectories exist inside the directory. tazzy 11-04-2002, 02:23 PM Originally posted by labgeek In most implementations of unix I've seen rmdir requires an empty directory. Which is probably why it didn't work. rm with -r (recursive) and -f (force - ie no prompting) is required when files or subdirectories exist inside the directory. Yes rmdir requires an empty directory. |