rssh - Verzeichnisse rekursiv löschen

Hallo =)

ich möchte gerne ein Verzeichnis (,das Dateien enthält, also nicht leer ist) rekursiv löschen.

rm -r
oder
rm foo/*
(rmdir - sowieso nicht)
gehen leider nicht.

Der Server lässt nur eine Verbindung via sftp zu, da eine rssh eingerichtet ist.
Gibt es irgend ein "work-around", um Verzeichnisse rekursiv zu löschen oder sogar rsync zu nutzen?
Das wäre sehr nützlich.
 
Jeder einigermassen brauchbare SFTP-Client sollte auch in der Lage sein rekursiv zu löschen.

Bezüglich 'rsync' könntest du mal einfach ein rsync via SSH probieren: rsync -e 'ssh' ...
 
Hm, habs immer noch nicht rausgefunden.
Diese Befehle sind auf dem Server verfügbar:

Code:
sftp> help
Available commands:
bye                                Quit sftp
cd path                            Change remote directory to 'path'
chgrp grp path                     Change group of file 'path' to 'grp'
chmod mode path                    Change permissions of file 'path' to 'mode'
chown own path                     Change owner of file 'path' to 'own'
df [-hi] [path]                    Display statistics for current directory or
                                   filesystem containing 'path'
exit                               Quit sftp
get [-Ppr] remote [local]          Download file
help                               Display this help text
lcd path                           Change local directory to 'path'
lls [ls-options [path]]            Display local directory listing
lmkdir path                        Create local directory
ln [-s] oldpath newpath            Link remote file (-s for symlink)
lpwd                               Print local working directory
ls [-1afhlnrSt] [path]             Display remote directory listing
lumask umask                       Set local umask to 'umask'
mkdir path                         Create remote directory
progress                           Toggle display of progress meter
put [-Ppr] local [remote]          Upload file
pwd                                Display remote working directory
quit                               Quit sftp
rename oldpath newpath             Rename remote file
rm path                            Delete remote file
rmdir path                         Remove remote directory
symlink oldpath newpath            Symlink remote file
version                            Show SFTP version
!command                           Execute 'command' in local shell
!                                  Escape to local shell
?                                  Synonym for help

rsync hat leider auch noch nicht geklappt:

Code:
This account is restricted by rssh.
Allowed commands: sftp 

If you believe this is in error, please contact your system administrator.

rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(605) [sender=3.0.9]
 
Scheint kein brauchbarer SFTP-Client zu sein. ;) Versuch's mal mit 'lftp'. Dort beherrscht der RM-Befehl auch den Parameter '-r' für rekursives Löschen.
 
Dank dir, mit lftp geht das schon besser.
Hab ich auch schon ausprobiert gehabt, ging aber beim ersten Anlauf nicht, also lieber 7mal ausprobieren, bevor ich das nächstemal frage.
 
Zurück
Oben