2010/10/09

Using Find

Throughout my use of linux I keep meaning to spend time to learn find, as it always seems to have useful, powerful applications. I never do seem to get around to it... Finally learned this useful little example though, using xargs and a command:

ACT ON FIND RESULTS - The cool thing is that if the results contain filenames with weird characters (like a space) xargs will separate items based on a null terminator instead of any white space.
find . -name pattern -print0 | xargs --null ls -alh
CASE INSENSITIVE
find . -iname pattern -print0 | xargs --null ls -alh

No comments:

Post a Comment