Mag. Leonhard Landrock wrote:
Why does "find / -name syslogd -exec pwd ;" not work?
You need to protect the last ; from the shell so it is passed as an argument to find, not seen as the end of the find command by the shell. You can choose \; ";" or ';' BTW, the description of the -exec action in the find(1) man page specifically says: "Both of these constructions [ ; and {} ] might need to be escaped (with a `\') or quoted to protect them from expansion by the shell." Also BTW, the " -exec pwd \; " will always print just / because "The command is executed in the starting directory." That's taken from the same paragraph of the man page--but only in some versions of the man page I have on my box??? You probably want: find / -name syslogd -exec dirname '{}' ';' - Brandon. -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page