Linux/Unix – List range of directories

If you want to list a range of directories in some path you can use this command: ls –ld /path/{list of directories to show}

 

For example:

ls –ld /home/project/disks/{dir001,dir002,dir003,etc…}

 

The output for this command will be:

drwxr-s—  4 mgsotoso user  8192 2008-10-20 09:03 /home/project/disks/dir001

drwxr-s—  4 mgsotoso user  8192 2008-10-20 09:03 /home/project/disks/dir002

drwxr-s—  4 mgsotoso user  8192 2008-10-20 09:03 /home/project/disks/dir003

Advertisements

About msotela

This blog is for anyone who wants to access the power of a Linux system as a systems administrator or user. You may be a Linux enthusiast, a Linux professional, or possibly a computer professional who is increasingly finding the Windows systems in your data center supplanted by Linux boxes.

Posted on March 16, 2009, in Unix/Linux. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: