[NTLUG:Discuss] Finding files

Patrick R. Michaud pmichaud at pobox.com
Thu May 15 10:48:07 CDT 2008


On Thu, May 15, 2008 at 09:49:17AM -0500, David Simmons wrote:
> 
> 
> > On Thu, May 15, 2008 at 12:26 AM, David Simmons
> <dave at dgnal.net> wrote:
> >> make sure you also re-run with
> ".*"
> 
> > -name '*' really does mean everything but
> is superfluous.  find will
> > get all files, including the
> "dot" files.
> 
> Geez...sorry, yes that's correct....its
> 'cp' that doesn't like the "dot" files

Actually, it's the shell that causes '*' to exclude dot files.

    $ echo *        # display names of files w/o leading dot
    $ echo .*       # display names of files with leading dot

In bash, this can be toggled using "shopt -s dotglob":

    $ shopt -s dotglob     # allow * to include leading dot
    $ echo *               # display all filenames

Pm



More information about the Discuss mailing list