[aclug-L] Re: dumb question again
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
> is that any flag can use on ls to show a list of
>directory name only?
>
>mysystem>ls -la
>drwxr-x-r-x ... ... ... dir1
>drwxr-x-r-x ... ... ... anotherdir
>-rwxr-x-r-x ... ... ... file1
>-rwxr-x-r-x ... ... ... anotherfile
If you don't see an option for this in your ls man page or from 'ls
--help', you'll need to use a pipe or create a shell alias. I've not seen
an option for it, but it isn't really much more typing to pipe to grep:
ls -la | grep ^d
where grep only prints the lines that begin with a 'd'.
>I want to type a ls command (without using pipe)
>show only
>dir1/
>anotherdir/
Once again, the pipe method:
ls -F | grep /$
Of course, many other approaches could give the same output, but it doesn't
get much simpler than that...
John
>I don't want to see files or the other coloum
>any easy way to do? I know that using pipe and grep
>can
>make it work and sed... I just wonder ls with some
>parameter can make it works..
>
>Thanks.
>Mav
-- This is the discussion@xxxxxxxxx list. To unsubscribe,
visit http://tmp2.complete.org/cgi-bin/listargate-aclug.cgi
|
|