I am using SSH to connect to a client's computer. I know that to delete a directory, I would type: rm -rf /directoryname the directory name, for example, is called "test directory" when I type rm -rf ./test directory I get "No such file or directory" Any ideas? Is it because I have spaces in the directory name? Thanks doctors. --------------------------- Eric Carbone
On Friday 03 May 2002 22:36, Clayton Cornell wrote:
when I type
rm -rf ./test directory
I get "No such file or directory"
Try: rm -rf ./test\ directory
First, you shouldn't really need the./ to remove a subdirectory (or file) from the current dir. Second, taking advantage of the shell's autocompletion saves you a lot of <ALT-GR>+\ (or whatever your keymap has you type to get a '\') because all you really need to type is enough of the filename that it unmistakable, then pressing <TAB> wil fill in the rest: rm -rf te<TAB> expands to: rm -rf test\ directory (assuming there aren't any other files starting with 'te', in which case pressing <TAB> once again will present you with a list of all files that start with 'te') - and so, in the true spirit of motion economics, you can reduce the number of keystrokes from 24 to 10 HTH Jon Clausen -- .signature ;)
Nor could you delete them in DOS. Try putting the name in quotes and it
should delete just fine.
rm -rf "/name with space"
Works in a command window in Win2K and should work in Linux as well.
Don
----- Original Message -----
From: "Eric Carbone"
I am using SSH to connect to a client's computer.
I know that to delete a directory, I would type:
rm -rf /directoryname
the directory name, for example, is called "test directory"
when I type
rm -rf ./test directory
I get "No such file or directory"
Any ideas? Is it because I have spaces in the directory name?
Thanks doctors.
---------------------------
Eric Carbone
participants (4)
-
Clayton Cornell
-
Donald E. Stidwell
-
Eric Carbone
-
Jon Clausen