[Sussex] Excluding hidden files and folders with find command
Dominic Humphries
linux at oneandoneis2.org
Wed Sep 21 08:08:33 UTC 2011
On Tue, 2011-09-20 at 22:40 +0100, Fay Zee wrote:
> The output from the find command doesn't include the /home/fay part.
> So it's been reduced from an absolute path to a relative path.
> Each result begins with ./ and that's what grep receives.
Ah. In that case, either:
$ find /home/fay/ -name '*listit*' | grep -v 'Downloads' | grep -v '/home/fay/listit/'
or
$ find . -name '*listit*' | grep -v 'Downloads' | grep -v '\./listit/'
should work.
This plus the '-type f' option should get you down to just the result
you want.
More information about the Sussex
mailing list