Re: list files but not directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/21/2009 12:58 PM, ann kok wrote:
Hi

any way to list files but not directory

Thank you


       __________________________________________________________________
The new Internet Explorer® 8 - Faster, safer, easier.  Optimized for Yahoo!  Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/


Seems like a very reasonable request and its a shame that ls does not provide such an option (which I guess would be an extension to the -A option)

Anyhow, if its OK to use grep, try this.


ls -1A --indicator-style=slash |grep -v -E "/$"

The --indicator adds a / to the end of dirs, the grep excludes entries that end in /

Albert.





--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux