list directories on a file system | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

list directories on a file system

UNIX for Dummies Questions & Answers


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 03-03-2003
yls177
Guest
 
Posts: n/a
list directories on a file system

how can i see the list of directories, mounted on a filesystem?
example, to show the list of directories mounted on / for aix
Sponsored Links
    #2  
Old 03-03-2003
norsk hedensk norsk hedensk is offline Forum Advisor  
Registered User
 
Join Date: Jul 2002
Last Activity: 26 May 2006, 8:38 PM EDT
Location: new york
Posts: 1,025
Thanks: 0
Thanked 1 Time in 1 Post
'ls' and the 'mount' command
Sponsored Links
    #3  
Old 03-03-2003
LivinFree's Avatar
LivinFree LivinFree is offline Forum Advisor  
Goober Extraordinaire
 
Join Date: Jul 2001
Last Activity: 16 June 2011, 4:50 PM EDT
Location: Portland, OR, USA
Posts: 1,626
Thanks: 2
Thanked 15 Times in 13 Posts

Code:
find / -type d -print

    #4  
Old 03-04-2003
yls177
Guest
 
Posts: n/a
mount will only show those file systems that are mounted over..., right?

find / -type d -print , yes, it will give all the directories that are mounted over /. But that is far too expressive. i wanted to have the parent directory only....

will go and find out more based on find / -type d -print...
even this method is not a direct command or function. are there such functionality around?

thanks
Sponsored Links
    #5  
Old 03-04-2003
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon (Administrator Emeritus)
 
Join Date: Aug 2001
Last Activity: 20 November 2014, 5:33 PM EST
Location: Ashburn, Virginia
Posts: 9,930
Thanks: 64
Thanked 438 Times in 261 Posts
It is not clear what you're asking for. Filesystems are mounted. Directories are simply created. When a filesystem is mounted, it is mounted on a directory and that directory is then called a mountpoint.

My guess is that you're confusing the issue by using the term "mount". If you want to get a list of the directories in a directory, try either:

cd /
ls -l | grep "^d"

or

cd /
find . -type d -print \( -name \* -prune \)
Sponsored Links
    #6  
Old 03-04-2003
yls177
Guest
 
Posts: n/a
okay, my question is a filesystem can contains a list of directories, right? so , how can i get the list of directories by issuing some commands, or running some scripts to teh filesystem?
Sponsored Links
    #7  
Old 03-04-2003
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon (Administrator Emeritus)
 
Join Date: Aug 2001
Last Activity: 20 November 2014, 5:33 PM EST
Location: Ashburn, Virginia
Posts: 9,930
Thanks: 64
Thanked 438 Times in 261 Posts
That's easy...
find / -type d -xdev
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
List directories and sub directories recursively excluding files pointers UNIX for Dummies Questions & Answers 3 02-23-2011 09:39 PM
How to list all the directories, sub directories in a mount along with size in ascending order? nmakkena Shell Programming and Scripting 4 10-27-2010 03:56 AM
List /home directories in a file warlock129 Shell Programming and Scripting 2 08-25-2009 10:33 PM
a remove script taken in input a file which contain a list of directories yeclota Shell Programming and Scripting 2 09-09-2008 11:56 AM
list file's by size order in sepecfied directory and sub directories ferretman UNIX for Dummies Questions & Answers 2 01-03-2002 07:55 PM



All times are GMT -4. The time now is 07:58 PM.