shell-script-pt
[Top][All Lists]
Advanced

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

Re: [shell-script] comando find


From: Gentil de Bortoli Júnior
Subject: Re: [shell-script] comando find
Date: Wed, 21 Sep 2005 14:28:07 -0300
User-agent: Debian Thunderbird 1.0.2 (X11/20050602)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Clovis, veja:

- -wholename pattern

File name matches shell pattern pattern. The metacharacters do not
treat `/' or `.' specially; so, for example, find . -wholename
'./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 . -wholename './src/emacs' -prune -o -print
- ---

Então, para seu caso, talvez você possa fazer:

find . -type f -name "*.bak" -wholename './home/clovis/backup' -prune

[]s

Gentil de Bortoli Júnior
KeyID: 0x8383E070 - www.keyserver.net


Clovis wrote:
> cd /home/clovis
> find . -type f -name "*.bak"
> vai localizar todos os arquivos .bak, dentro do diretorio /home/clovis, 
> mas eu nao quero q ele localize os arquivo *.bak q ficam dentro de um 
> diretorio /home/clovis/backup, tipo excluir ele da procura.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDMZgnU6AHyoOD4HARArMmAKDcGThnUaje0iy0MfKZckeJHGiV1wCgq7I6
UNBRlMn4glU8PfzvQ9XdnNE=
=bjPn
-----END PGP SIGNATURE-----


reply via email to

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