Click to See Complete Forum and Search --> : deleting directory which is not empty


linarx
10-27-2001, 02:52 PM
How can I delete directory which is not empty or directory tree? Also when using ftp. Thanks.

MaxWave
10-27-2001, 03:03 PM
I'm not sure about ftp but in shell just use -r for recursive and -f to avoid the prompt. If you had a directory /bin/laden you would type rm -rf /bin/laden.

linarx
10-30-2001, 02:46 PM
Thanx MaxWave. I actually needed it for removing the files left by intruders on Windows machine. Windows did not recognize names and path of these files. I mounted win drive to Linux box and deleted them with Linux commands. It worked. Cool.
I have another question (maybe dumb, but this is about newbies, right?)
What is a shell command (shortcut keys) which repeats the last (previous) command on command line without need to retype it? Thanx again

scanez
10-30-2001, 02:52 PM
Originally posted by linarx:
<STRONG>Thanx MaxWave. I actually needed it for removing the files left by intruders on Windows machine. Windows did not recognize names and path of these files. I mounted win drive to Linux box and deleted them with Linux commands. It worked. Cool.
I have another question (maybe dumb, but this is about newbies, right?)
What is a shell command (shortcut keys) which repeats the last (previous) command on command line without need to retype it? Thanx again</STRONG>
The up arrow key. And for name completion, tab.

thedexman
10-30-2001, 02:57 PM
It depends on what shell you are using. In bash you can use Ctrl-p, or in csh/tcsh !:, or ksh r. Many times you can also just use the up arrow on your keyboard.