is there a command in Unix (something like ls -"X") to list the directories and all subdirectories.
While ls -d does this, i want the full roots of the folder.
I cannot find a way to do this.
my intended result would look like this...
/home/toodles/dir1
/home/toodles/dir2
/home/toodles/dir2/subdir
Thanks in advance,
Unix Directory listing?
You could do:
find [directory] -type d -print
As long as you list the full path for [directory], it will be shown on each individual entry.
Example:
# find /home/oracle -type d -print
/home/oracle
/home/oracle/.kde
/home/oracle/.kde/Autostart
/home/oracle/scratch
/home/oracle/bin
This prints the top-level directory as well (/home/oracle in this case). If you want to skip that, add "-mindepth 1" to the arguments:
find [directory] -mindepth 1 -type d -print
yugioh cards
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment