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
name:

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

Nils
-- 
 Nils Philippsen / Berliner Straße 39 / D-71229 Leonberg // +49.7152.209647
[EMAIL PROTECTED] / [EMAIL PROTECTED] / [EMAIL PROTECTED]
   The use of COBOL cripples the mind; its teaching should, therefore, be
   regarded as a criminal offence.                  -- Edsger W. Dijkstra


************
[EMAIL PROTECTED]   http://www.linuxchix.org

Reply via email to