Re: Using -prune option of find to ignore hidden directories
-----BEGIN PGP SIGNED MESSAGE-----
On Wed, May 03, 2017 at 10:45:30PM -0700, Bob McGowan wrote:
> >>> before all that:
> >>> echo find /home/richard -type d -name .*
> >> That seems like a helpful trick, but I'm not sure what I should see.
> >> On my (Wheezy) system, I tried that, i.e.:
> >> echo find /home/<my_username> -type d -name .*
> >> and
> >> echo find /home/<my_username> -type d -name '.*'
> >> and, in both cases, I got the same result:
> >> find /home/<my_username> -type d -name .*
> What directory were you in when you ran the command? If you were in
> your home directory, the .* should have expanded into ". .. <and every
> .file and .directory>", if you were in some other directory you might
> only see the ". .." (dot dotdot).
> When I ran it in my home directory, I saw everything from .ICEauthority
> to .xsession-errors.
Exactly. Try again in a directory with something in it, and you'll
appreciate the whole power/curse of the thing :-)
The shell takes a lot from the "ambient" (current directory, shell
variables inherited through the dynamic path, etc.) and this makes
for an incredibly concise language, but is an opportunity for incredibly
Learning shell means developing some feeling for this ambient.
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
-----END PGP SIGNATURE-----