path exclude ve find
KubaZ
r.kubaz na seznam.cz
Čtvrtek Září 23 13:30:04 CEST 2004
Dne čt 23. září 2004 15:15 Tomas Rett napsal(a):
> Nevite nekdo, jak vyloucit urcity adresar z prohledavani prikazem find ?
> Napriklad vyloucit adresar /xfn z prikazu find / -name core
>
> Tomas Rett
>
myslim, ze v [b]man find[/b] je to vysvetleno velice dobre:
-path pattern
File name matches shell pattern pattern. The metacharacters do
not treat `/' or `.' specially; so, for example, find . -path './sr*sc' will
print an entry for a directory called './src/misc' (if one exists).
To ignore a whole directory tree, use -prune rather than
checking every file in the tree. For example, to skip the directory
`src/emacs' and all files and directories under it, and print the names of
the other files found, do something like this:
find . -path './src/emacs' -prune -o -print
Další informace o konferenci Linux