how can i display the list of directories(only)


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers how can i display the list of directories(only)
# 1  
Old 07-19-2001
Network how can i display the list of directories(only)

when i am giving ls command it displays all the files and directories how can we the list of directories in the current directory?
# 2  
Old 07-19-2001
Hi,

In Linux you can list directories only by typing: ls -d */

AndySmilie
# 3  
Old 07-20-2001
hi

on solaris ls -F gives shows you all the directories ending with a
/ , then you can do a grep on it. like this
ls -F | grep '/'
# 4  
Old 07-24-2001
On most systems this should do if you want to list directories under your current directory only:

ls -l | grep ^d

Oscar
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to display only Directories in filesystem?

Hi, I want to display only directories inside a particular file system. TIA (2 Replies)
Discussion started by: sumanthupar
2 Replies

2. UNIX for Dummies Questions & Answers

List the directories, having given pattern in the directories name, sorted by creation date

It is for HP-Unix B.11.31. Requirement: 1. List the directories, having given pattern in the directories name, sorted by creation date. Example: Directories with name "pkg32*" or "pkg33*" 2. On the output of 1. list the directories by creation date as sort order, with creation date... (2 Replies)
Discussion started by: Siva SQL
2 Replies

3. UNIX for Dummies Questions & Answers

Using tree to display only certain directories

I want to use tree to display the directory tree. It is easy to use tree -d -L 2 However I would like to run it on specific list of directories. Can such a thing be performed? Example: /media/academic-repo/chrisd/literature tree -d prose -L 2 prose ├── computer-technology... (1 Reply)
Discussion started by: kristinu
1 Replies

4. Shell Programming and Scripting

How to list all the files, directories and sub-directories in the current path except one directory?

Can anyone come up with a unix command that lists all the files, directories and sub-directories in the current directory except a folder called log.? Thank you in advance. (7 Replies)
Discussion started by: Manjunath B
7 Replies

5. UNIX for Dummies Questions & Answers

List directories and sub directories recursively excluding files

Hi, Please help me, how to get all the direcotries, its sub directories and its sub directories recursively, need to exclude all the files in the process. I wanted to disply using a unix command all the directories recursively excluding files. I tried 'ls -FR' but that display files as... (3 Replies)
Discussion started by: pointers
3 Replies

6. Shell Programming and Scripting

How to list all the directories, sub directories in a mount along with size in ascending order?

Hi , I am very new to unix as well as shell scripting. I have to write a script for the following requirement. In a particular mount, have to list all the directories and sub directories along with size of the directory and sub directory in ascending order. Please help me in this regard and many... (4 Replies)
Discussion started by: nmakkena
4 Replies

7. Shell Programming and Scripting

Display only subdirectories from given directories

Hi Genius, I would like to display all the subdirectories only with timestamp. For exmple: Given Directory : orabkup /orabkup total 11365112 drwxr-xr-x 9 oracle oradba 256 Jan 03 16:01 db1 /orabkup/db1: total 0 drwxr-xr-x 2 oracle oradba 256 Jan 03 16:01... (8 Replies)
Discussion started by: HAA
8 Replies

8. UNIX for Dummies Questions & Answers

How to display directories recursively?

Cannot find how to list the directory structure of a volume recursively. Do not want the files reported. Say I have 100 directories and 10,000 files, I do not want 10,000 lines of output. (If this is relevant, I am using the terminal on my OSX Mac). I hope this is easy - there should be an easy... (5 Replies)
Discussion started by: jwriter
5 Replies

9. Shell Programming and Scripting

export display of directories of remote machine

hi I wanted to export the display of all directories of home with their respective subdirectories and files if any on my local pc. this home directory is of some remote machine . using ssh remote login and then using struct direct i can just gate name list of directories . but not the display... (2 Replies)
Discussion started by: bhakti
2 Replies

10. Shell Programming and Scripting

Bash Script to display directories in Path?

Hello there, As a newbie: The directories in PATH can be hard to distinguish when printed out as one line with colon .Please, can i have a sample script to display them,one to a line. Thank you. (1 Reply)
Discussion started by: debut
1 Replies
Login or Register to Ask a Question