Viewing only Directories
am 21.01.2008 18:20:30 von SanchitI am Using Fedora and i want to see only directories
I am using ls -lad but it is only showing me the current directory.
SO What should I do??
I am Using Fedora and i want to see only directories
I am using ls -lad but it is only showing me the current directory.
SO What should I do??
Sanchit wrote:
> I am Using Fedora and i want to see only directories
>
> I am using ls -lad but it is only showing me the current directory.
> SO What should I do??
find . -type d -| xargs ls -lad
Bye, Jojo
Joachim Schmitz wrote:
> Sanchit wrote:
> > I am Using Fedora and i want to see only directories
> >
> > I am using ls -lad but it is only showing me the current directory.
> > SO What should I do??
> find . -type d -| xargs ls -lad
>
> Bye, Jojo
Thanks!
Sanchit scrisse:
> ... i want to see only directories I am using ls -lad
> ...
ls -al | grep ^d
On 21 Gen, 22:58, "mallin.shetland"
> Sanchit scrisse:
>
> > ... i want to see only directories I am using ls -lad
> > ...
>
> ls =A0-al | grep ^d
Joachim Schmitz wrote:
> Sanchit wrote:
> > I am Using Fedora and i want to see only directories
> > I am using ls -lad but it is only showing me the current directory.
> > SO What should I do??
find . -type d -| xargs ls -lad
find: -: unknown option
I do not understand why is not in posix format under macosx,dammed
On Jan 22, 6:31 am, franzi
> On 21 Gen, 22:58, "mallin.shetland"
>
> > Sanchit scrisse:
>
> > > ... i want to see only directories I am using ls -lad
> > > ...
>
> > ls -al | grep ^d
> Joachim Schmitz wrote:
> > Sanchit wrote:
> > > I am Using Fedora and i want to see only directories
> > > I am using ls -lad but it is only showing me the current directory.
> > > SO What should I do??
>
> find . -type d -| xargs ls -lad
> find: -: unknown option
> I do not understand why is not in posix format under macosx,dammed
remove the "-" after the "d".
find . -type d | xargs ls -lad
On Jan 22, 1:20 am, Sanchit
> I am Using Fedora and i want to see only directories
>
> I am using ls -lad but it is only showing me the current directory.
> SO What should I do??
ls -p|grep "/"
franzi wrote:
> On 21 Gen, 22:58, "mallin.shetland"
>> Sanchit scrisse:
>>
>>> ... i want to see only directories I am using ls -lad
>>> ...
>>
>> ls -al | grep ^d
>
> Joachim Schmitz wrote:
>> Sanchit wrote:
>>> I am Using Fedora and i want to see only directories
>>> I am using ls -lad but it is only showing me the current directory.
>>> SO What should I do??
> find . -type d -| xargs ls -lad
> find: -: unknown option
That additional - was a typo of mine...
> I do not understand why is not in posix format under macosx,dammed
Bye, Jojo
On Jan 21, 10:20=A0pm, Sanchit
> I am Using Fedora and i want to see only directories
>
> I am using ls -lad =A0but it is only showing me the current directory.
> SO What should I do??
try this : ls -l | grep ^d (or) ls -Rl | grep ^d
ashokpj@gmail.com writes:
> On Jan 21, 10:20Â pm, Sanchit
> > I am Using Fedora and i want to see only directories
> >
> > I am using ls -lad  but it is only showing me the current directory.
> > SO What should I do??
>
> try this : ls -l | grep ^d (or) ls -Rl | grep ^d
You can also get the names and sizes of the directories by the "du" command.
On Mon, 21 Jan 2008 09:20:30 -0800 (PST), Sanchit wrote:
> I am Using Fedora and i want to see only directories
>
> I am using ls -lad but it is only showing me the current directory.
> SO What should I do??
ls -ld -- */ .*/
will work in most shells. Wether "." and ".." are output is
shell dependant.
In zsh:
ls -ld -- *(D/)
(D) to include dot files.
(/) to select directories only.
(note that zsh won't expand "." and ".." there).
If you're also interested in symlinks to directories:
ls -Lld -- *(D-/)
--
Stephane
if you just want the directory names without the long format:
ls -F | grep '/$'
If you have the markdirs option on, you can also use:
ls -d */
On Tue, 22 Jan 2008 06:42:25 -0800 (PST), hyperboogie wrote:
> if you just want the directory names without the long format:
>
> ls -F | grep '/$'
>
> If you have the markdirs option on, you can also use:
>
> ls -d */
markdirs, which is a zsh option only, is only to add a "/" upon
the filename generation to the directory names.
ls -d */
will work regardless of the markdirs option in most shells..
However, the above will not work correctly if some of the
directory names start with "-", hence:
ls -d -- */
(it won't list hidden dirs).
See also:
printf '%s\n' */
(as globbing is doing the directory listing, ls is no longer
required).
--
Stephane
Sanchit
> I am Using Fedora and i want to see only directories
>
> I am using ls -lad but it is only showing me the current directory.
> SO What should I do??
ls -lad */
--
Best regards, _ _
.o. | Liege of Serenly Enlightened Majesty of o' \,=./ `o
..o | Computer Science, Michal "mina86" Nazarewicz (o o)
ooo +--
Stephane Chazelas
> hyperboogie wrote:
> ...
> markdirs, which is a zsh option only, is only to add a "/" upon
> the filename generation to the directory names.
> ...
ksh(1) version 1988 and newer implements a "markdirs" shell option:
set -o markdirs
=Brian