Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mount points centos

Status
Not open for further replies.

dustervoice

Technical User
Apr 2, 2009
56
0
0
GB
whats is the command in centos to see where /var /etc/ /proc/ and all those directories are mounted.. i know they are on /dev/VolGroup00/LogVol00 but i need the a command to show me that... thanks
 
wouldn't a simple 'df' command provide you this info
 
Try just issuing a "mount" command with no options. It should list of the mount points.
 

I suspect you want this for a script?

what you want is to traverse the filesystem to find where a directory is located. "df /var" WILL give you that value because df must figure out which filesystem a path is located. "df -P /var" will give it Posix format which is easier to parse.
 
Depending on how your disks were partitioned, /var might not be a separate file partition and may be included under the / partition.

Check the /etc/fstab which contains static information about the filesystems. If /var is not listed in that file, then /var is not a mounted filesystem, but is part of the root or / partition.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top