I have a problem with my infrastructure here.

I am in a closed DMZ and have to access a FTP-Server in another DMZ from a headless Suse Linux 10.1.

So i think i only got the ftp command.. But i have to delete a directory with about 100 subdirectorys and endless files in it..

When I type

del directory

it returns "Its not empty" and so i have to delete each sub directory and file manually.

Oh please tell me a way how i can do this automatically :)

link|improve this question

feedback

3 Answers

up vote 2 down vote accepted

Use lftp. The the -r option to lftp rm recursively deletes directories and files.

$ lftp -u <user>,<pass> <server> 
lftp> rm -r <directory>

should do the trick.

link|improve this answer
I installed lftp and now it works :) – Fake4d Jan 12 '11 at 9:35
feedback

The lftp command, which is available in many distros (though I'm no SUSE expert), supports "rm -r" for exactly that purpose.

link|improve this answer
Thanks! I installed it! – Fake4d Jan 12 '11 at 9:36
feedback

rm -rf?

http://en.wikipedia.org/wiki/Rm_(Unix)

link|improve this answer
No this doesnt work in FTP! – Fake4d Jan 12 '11 at 7:52
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.