Am Samstag, 19. August 2006 00:41 schrieb Brandon Peirce: > 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 ';'
Thanks. > 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." More thanks. BTW: You are absolutely right with the man page. Don't know why I haven't seen that at once. > 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 '{}' ';' Yes, that's what I wanted. :-) Once again: Thank you! > - Brandon. Leonhard. -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page