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

Re: Specialized disk directory tools




On 9/13/25 6:04 AM, tomas@tuxteam.de wrote:
On Sat, Sep 13, 2025 at 02:48:28AM -0500, Richard Owlett wrote:

Apparently "find" only crawls the current directory and sub-directories.
No. It crawls each directory you pass it in its arglist:

   find . /usr/local /var/lib

would look in the current dir (.), /usr/local and /var/lib

Makes it very nice for for my case. I'm only interested in files under
/home/richard . It would be almost perfect if it would ignore hidden files
and directories ;/
Whatever you mean by "hidden files and directories". If you mean those
whose name begins with a dot, excluding those is what you want.

Typically, you'd do it with find by short-circuiting the pattern.
Roughly:

   find ... -name ".*" -o ...

Cheers

I can be a little slow so  the [ find ... -iname ".*" -o ... ] did not work for me probably because I do not use 'find' enough to know what to do with the trailing ...

However, I tried

    find . -maxdepth 1 -iname "*"  | grep -v "\.\/\."

 and to the level that I understand what the original problem is/was, it gets what I (not necessarily what the person with original problem) thinks is the solution.

Anyways thanks for the opportunity to do a very short refresher with 'find' and with regex and also hopefully catching myself before posting a private message

to tomas and not including the list. (someone like me needs time to bumble through the stupid mistakes a few times (or more) before gaining any proficiency)


Reply to: