find: incomplete statement or Argument for -c ends in backslash. Here's an example of how to do it with some Perl variable substitutions thrown in. Nothing Earth-shattering, but if it saves someone five minutes, it's worth posting.
# in my actual code, I had "rm" instead of "ls -l", but I figured this + would be safer in an example. system "/usr/local/bin/ssh $remote \"find $base_dir -mtime +$days -exe +c ls -l \\{} \\;\"" and warn "system: ssh: $!";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Run system find -exec on remote machine
by Aristotle (Chancellor) on Dec 21, 2004 at 04:07 UTC | |
by eyepopslikeamosquito (Archbishop) on Dec 21, 2004 at 05:56 UTC | |
by Aristotle (Chancellor) on Dec 21, 2004 at 06:25 UTC | |
by gaal (Parson) on Dec 21, 2004 at 06:47 UTC |