list files but not directory

Sharpe, Sam J sam.sharpe+lists.redhat at gmail.com
Sun Aug 23 22:49:32 UTC 2009


2009/8/23 Cameron Simpson <cs at zip.com.au>:
> On 21Aug2009 05:17, ann kok <oiyankok at yahoo.ca> wrote:
> | ls -1 but I only want the file to list not directory
>
> Please don't top-post. PLease BELOW and TRIM the quoted material for
> context, as I have done.
>
> Have you tried:
>
>  ls -l | grep '^-'

I don't understand why this thread has been going on so long. I also
can't understand how the OP couldn't solve this with a quick {insert
web search engine of your choice} query.

alias lsf='find . -maxdepth 1 -type f -ls'
alias lsd='find . -maxdepth 1 -type d -ls'

-- 
Sam




More information about the fedora-list mailing list