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?
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