Mass find/replace...

Matthew Seaman m.seaman at infracaninophile.co.uk
Fri Dec 5 01:48:40 PST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

Peter Boosten wrote:
| Marc Coyles wrote:
|> I'm presuming it'd be:
|>
|> Find /home/horbury -type f -name "*.bak" -exec \
|> 	Rm *.bak
|>
|
| find /home/horbury -name "*.bak" -exec rm {} \;
|

find /home/horbury -type f -name '*.bak' -delete

'delete' is a find primitive -- no need to exec any other processes.

	Cheers,

	Matthew

- --
Dr Matthew J Seaman MA, D.Phil.                       Flat 3
~                                                      7 Priory Courtyard
PGP: http://www.infracaninophile.co.uk/pgpkey         Ramsgate
~                                                      Kent, CT11 9PW, UK
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEAREDAAYFAkk4+OAACgkQ3jDkPpsZ+VbPwACfUrggUN1yIPqkq3pgCyy6fFzH
sncAn2WW0XD9l9NgNtK4T2IiMqoyxY6f
=1CX6
-----END PGP SIGNATURE-----


More information about the freebsd-questions mailing list