views:

124

answers:

3

How can you find files by the following regex?

[^.]

The solution may be in the commands: find, perl, ls

+2  A: 
ls | grep -v \\.

You may have to be more specific in stating your question if this doesn't satisfy your requirements.

Greg Hewgill
That will find directory names as well.
Chas. Owens
+3  A: 

If it's about filename, like Greg thinks, then I'd suggest

find . -type f -not -name \*.\*

command instead.

Michael Krelin - hacker
add `-type f` if you just want file names (i.e. not directory names as well).
Chas. Owens
Thanks, edited.
Michael Krelin - hacker
Thank you for your answer!
Masi
+4  A: 
perl -MFile::Find -le 'find sub { print if -f and /[^.]/ }, "."'

This will look in the current directory and all subdirectories for files that don't have a period in them.

Chas. Owens