[prog] Perl and find(1)

Kathryn Hogg kjh at flyballdogs.com
Mon Dec 11 05:12:52 UTC 2006


Jacinta Richardson wrote:

> jarich at bella:/tmp$ find . -atime +14 -name "*.tgz" -print -exec "ls -al"
> find: missing argument to `-exec'

You don't want the double quotes around the ls command and you need the {}
and the \;
{} substitutes the current file
; terminates the -exec but since it also has meaning to the shell, you
need to escape with a \

find . -atime +14 -name "*.tgz" -print -exec ls -al {} \;

-- 
Kathryn
http://womensfooty.com


More information about the Programming mailing list