bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 4.1.7 find directories & exec oddness


From: Andreas Metzler
Subject: Re: 4.1.7 find directories & exec oddness
Date: Wed, 12 Jan 2005 20:21:58 +0100
User-agent: Mutt/1.5.6+20040907i

On 2005-01-12 Illtud Daniel <address@hidden> wrote:
[..]
> $ mkdir reel1
> $ mkdir reel1/Wills
> $ mkdir reel2
> $ mkdir reel2/Wills
> $ find . -name Wills -exec "ls -l {}" \;
> find: ls -l ./reel1/Wills: No such file or directory
> find: ls -l ./reel2/Wills: No such file or directory

> Was this a bug that's been fixed, or am I using find incorrectly?

Hello,
You are using find incorrectly. You are telling it to execute the
command "ls -l ./reel1/Wills" (ls<space>-l<space>./reel1/Wills) while
you *wanted* find to execute the command "ls" with two additional
arguments, "-l" and "/reel1/Wills"

address@hidden:~$ "ls -ld /tmp"
bash: ls -l /tmp: No such file or directory

find . -name Wills -exec ls -l '{}' \;
              cu andreas
-- 
"See, I told you they'd listen to Reason," [SPOILER] Svfurlr fnlf,
fuhggvat qbja gur juveyvat tha.
Neal Stephenson in "Snow Crash"
                                           http://downhill.aus.cc/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]