Usando qualquer comando em FTP
Precisava fazer um 'find' num servidor remoto onde só tenho aceso por FTP, mas isto nom é possível com um cliente ftp "normal". Mas depois de googlear um bocado achei a soluçom.
Com CurlFtpFS é possível, esta ferramenta permite usar qualquer comando (p.e. find) e o seu uso é muito singelo.
$ mkdir sunet $ curlftpfs ftp://ftp.sunet.se/ sunet/ $ cd sunet/ $ ls -l total 0 Dr-xr-xr-x 3 root root 96 Feb 23 2004 bin dr-xr-xr-x 2 root root 72 Mar 2 2004 dev dr-xr-xr-x 2 root root 48 Feb 23 2004 etc dr-xr-xr-x 2 root root 120 Feb 23 2004 lib -rw-r--r-- 1 root root 622187310 Mar 11 06:13 ls-lR -rw-r--r-- 1 root root 76389037 Mar 11 06:15 ls-lR.gz drwxrwxr-x 37 root root 1272 Feb 27 14:17 pub dr-xr-xr-x 3 root root 72 Feb 23 2004 usr $ cd ..
$ fusermount -u sunet/
E o que eu procurava:
# To remove all files which are older than 5 days.
cd /root/tmpftp
find ./ -mtime +5 -exec rm -f {} \;
chúzame -