in reply to Rename all files on remote server to *.bak recursively
$remotehost="somehost.tld"; $remotedir="/some/dir/"; $cmd="/usr/bin/ssh $remotehost find $remotedir -type f -print". '| perl -ne \'chomp;$n=$_.q^.bak^;rename($_,$n)\''; print "cmd is [$cmd]\n"; #uncomment after testing #system($cmd);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Rename all files on remote server to *.bak recursively
by nancylt723 (Initiate) on Jun 06, 2014 at 12:05 UTC | |
by kschwab (Vicar) on Jun 06, 2014 at 20:56 UTC |