[olug] list just directories and not files
Brian Wiese
bwiese at cotse.com
Fri Sep 2 01:13:06 UTC 2005
Is there a way in unix to list "just the directories" and none of the
other files?
I could use a "find . -type d -maxdepth 1" but I'd also like to list the
permissions of these directories, then of course quickly change them to
make them all executable.
Any suggestions? =)
And note, "ls -d" does not work like I think it should, I can only use
it on specific directories to see permissions, like "ls -ld Maildir"
Brian
List Files and Directories
ls /directory-name/ - list contents of directory
options:
-a list all files including invisible files
-l long list - shows ownership, permission, and links
-t list files chronologically
* -f * append "*" to executable file name, "/" to directory name
* -d * list directories
* -u * list files using time of last access instead of time of
last modification
* -F * mark directories with forward slash, mark executables
with an @-sign.
* -g * lists ownership of each file or directory
Brian
--
bwiese[at]cotse.com | brianwiese.net | 402.297.9392
"What we do in life echoes in eternity" - Gladiator
More information about the OLUG
mailing list