in reply to File not found error
Well, first of all, your find syntax is incorrect (did you mean to specify ${wkDir} earlier in the command line?).
Secondly, you should use safer list variant of system: system(qw/find . -mtime +20 -type d/,$wkDir,qw/-exec rm -rf {} ;/); (in this case the qw// operator splits the line in a list and passes all arguments safely straight to find not invoking any shell).
Thirdly, you didn't state what did you want to do. Please read How do I post a question effectively? and XY Problem and tell us what you wanted to achieve using this command.
Sorry if my advice was wrong.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: File not found error
by rrrrr (Novice) on Oct 11, 2012 at 05:00 UTC | |
by aitap (Curate) on Oct 11, 2012 at 15:44 UTC |
In Section
Seekers of Perl Wisdom