
January 26th, 2005, 06:05 AM
|
|
Registered User
|
|
Join Date: Oct 2004
Posts: 29
Time spent in forums: 3 h 23 m 45 sec
Reputation Power: 0
|
|
|
ls files not directorys
Hi,
Just looked at the man page for ls and counldnt seem to find what I was looking for... I want a way to do an ls and ONLY shows files and not directories.. Theres an option -F which puts a / at the end of the directory names, maybe theres a way to filter out the directory names using this option and something like grep...
However the option -F puts a * at the back of some of my filters so I reckon I need some this like....
we are doing like this but there must be a simpler way right?
ls -F | grep -v "/" | sed "s/\([^*]*\)\*/\1/g"
Thanks in advance...
Anthony
|