LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ls files without any "." (https://www.linuxquestions.org/questions/linux-newbie-8/ls-files-without-any-584716/)

powah 09-14-2007 04:16 PM

ls files without any "."
 
How to ls files without any "."?

Directory has files:
file1.cpp
file1.o
file1

The desired output of ls is:
file1

Tinkster 09-14-2007 04:31 PM

Code:

ls --hide \*.\*


Cheers,
Tink

carl0ski 09-14-2007 04:36 PM

Quote:

Originally Posted by powah (Post 2892064)
How to ls files without any "."?

Directory has files:
file1.cpp
file1.o
file1

The desired output of ls is:
file1

generally excluding anything with . in it will also exclude filenames containing .

but this should? work for all standard . extension

ls |grep -v .??? |grep -v .?? |grep -v .?

chrism01 09-16-2007 01:47 AM

ls|grep -v '\.'

powah 09-17-2007 08:10 AM

Quote:

Originally Posted by Tinkster (Post 2892074)
Code:

ls --hide \*.\*
Cheers,
Tink

It works.
Thanks!


All times are GMT -5. The time now is 11:53 PM.