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

Re: Using -prune option of find to ignore hidden directories



Hi,

Richard Owlett wrote:
> I tried
>   find /home/richard \( -type d -name .* -prune \) -o -atime -42 -print
> and
>   find /home/richard \( -type d -name .* -prune \) -atime -42 -print
> ...
> Each got an "find: paths must precede expression: .." error

You need to hide the .* word from the shell parser. I assume the parser
produces more than one word when looking for matching files.
Try:

  find /home/richard \( -type d -name '.*' -prune \) -o -atime -42 -print


Have a nice day :)

Thomas


Reply to: