[techtalk] Filename star

Nils Philippsen nils at wombat.dialup.fht-esslingen.de
Fri Dec 31 13:13:28 EST 1999

On Thu, 30 Dec 1999, Samantha Jo Moore wrote:

> The dot "." is a very special character which is used to separate filename
> segments and cannot be associated with a "*".  Thus to find all files with
> metacharacters in their names we need to issue two commands:
>     find . -name '*\**' -print
>     find . -name '.*\**' -print

Not quite. The only place where a dot is special is at the beginning of a
filename (Unix has no such concept as filename segments) where it means
"this file is hidden". A "find . -name '*\**' -print" will find all files
containing an asterisk except the ones with a dot at the beginning of the

nils at wombat:~/test> touch '*' '*.*' '.*'
nils at wombat:~/test> find . -name '*\**' -print

 Nils Philippsen / Berliner Straße 39 / D-71229 Leonberg // +49.7152.209647
nils at wombat.dialup.fht-esslingen.de / nils at fht-esslingen.de / nils at redhat.de
   The use of COBOL cripples the mind; its teaching should, therefore, be
   regarded as a criminal offence.                  -- Edsger W. Dijkstra

techtalk at linuxchix.org   http://www.linuxchix.org

More information about the Techtalk mailing list