listing directories and sub directories with time and name options

Hello all!

I'm looking to list directories and sub-directories of a path, on this forum I found this command:

find $path -type d -exec ls -ld {} \;

The issue I have is that with a simple ls, the list is listed by name, and using -t I get it by time.
How could I list directories and sub directories getting an output by name or by time?

Thanks!

-david

try this

find /home/proj/ -type d -exec ls -ld {} \; |awk '{print $7,$8}'

This print me date and time only.

What I'm looking for is to sort my list by name as ls would do on the first level:
ls -l1d

and have the option to sort it by time too:

ls -l1dt

but on all directories and sub directories too.

Hi nomadvisuals,

Please try this,

find `pwd` -type d | xargs ls -ld | awk '{print $4,$5,$6,$7,$8}'

with Chears :b:,

Shanmu

Kick ass! This works perfectly for my needs!!! Thank you so much!

-david

Hi Dude,

FYI,

ls -ltr | grep '^d' | awk '{print $8;}' | xargs -I {} find `pwd`'/{}' -type d

the above mentioned one sort the sub directries by time from older date to latest date but we can't get the date from the above one but it will perfectly when compared to previous one which i posted for u. please try this mate

Regards
shanmu