-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
daniel wrote:
| On January 14, 2005 01:19 pm, Boyd Stephen Smith Jr. wrote:
|
|>On Friday 14 January 2005 07:00 am, Ow Mun Heng <[EMAIL PROTECTED]>
|>
|>wrote:
|>
|>>I was using
|>>
|>>find . -type f -maxdepth 1 -iname *gentoo*
|>>
|>>and that didn't work. How come?? (it lists everything!)
|>
|>*gentoo* was being expanded by bash; I'm not sure why find didn't give you
|>an error.
|
|
| you could probably use:
|
| $ find . -type f -maxdepth 1 -name '*gentoo*' -print0 | \
| xargs -0 --replace mv "{}" /path/to/new/dir/
I'm always a little confused as to why people always jump to suggest the
use of xargs when find's -exec works perfectly well;
$ find . -type f -maxdepth 1 -name "*gentoo*" -exec mv "{}"
/path/to/new/dir/ \;
Is there any particular reason why people would recommend using xargs
over -exec?
- --
http://www.mattsscripts.co.uk/
~ - A great source for free CGI and stuff
DPRINTK("Last time you were disconnected, how about now?\n");
~ linux-2.6.6/drivers/net/tokenring/ibmtr.c
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFB6F+Ims1059AAPcwRAmDtAKDMw/i2fcNHa5ACx80hT/f8pdvpBQCg2RMN
03WSMWxq8aNs3DO4BUQ04ng=
=y+1P
-----END PGP SIGNATURE-----
--
[email protected] mailing list