LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-14-2010, 04:13 PM   #1
ken poy
LQ Newbie
 
Registered: Jun 2010
Posts: 19

Rep: Reputation: 0
Smile Question how to associate a physical Disk Partition with directory


Hi, i would like to determine the hard drive partition associated with a directory. ie i have a disk partition as user with mount point Home. this i think contains my Home directory. a downloaded program resides in /usr/bin.
now there is a /usr/local/bin with nothing in it. my question is how can i tell what disk partition /usr/bin resides on. if it is on my user defined partition i will not lose the program on a system install i think??
thanks ken
 
Old 12-14-2010, 04:15 PM   #2
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,825
Blog Entries: 1

Rep: Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221
What's the output of 'df -h'?
 
Old 12-14-2010, 04:16 PM   #3
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
You can type df -h to see what partitions are currently mounted. Linux is a tree structure, so if /usr is not expressly mounted on it's own partition, then it will live under /.
 
Old 12-14-2010, 04:30 PM   #4
sys64738
Member
 
Registered: May 2008
Location: NRW/Germany
Posts: 105

Rep: Reputation: 30
Hi
I would do a
Code:
df -h .
when in that directory.
That will show the partition and mountpoint of the directory you are in.
You could also do
Code:
df -h /usr/local/bin
to get that information for a particular directory.
 
1 members found this post helpful.
Old 12-16-2010, 10:57 AM   #5
ken poy
LQ Newbie
 
Registered: Jun 2010
Posts: 19

Original Poster
Rep: Reputation: 0
Smile

hi thanks for the updates. following is the output of DF -h

ken@ken-laptop:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 56G 2.7G 50G 6% /
none 434M 308K 433M 1% /dev
none 438M 116K 438M 1% /dev/shm
none 438M 304K 437M 1% /var/run
none 438M 0 438M 0% /var/lock
none 438M 0 438M 0% /lib/init/rw
/dev/sda6 17G 5.8G 10G 37% /home
ken@ken-laptop:~$

i'll try other paramaters of df & du. thanks again ken
 
Old 12-16-2010, 11:38 AM   #6
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
So it looks like you're correct. /home is on /dev/sda6. /usr/bin and /usr/local/bin fall under the / directory which is on partition /dev/sda1.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
dd cloning to a larger disk partition question ciarlatano Linux - General 1 04-23-2007 04:23 AM
Migrate Directory to Separate Disk Partition Neapolitan Red Hat 1 01-18-2006 02:51 PM
cannot use 100% of hard disk, fdisk / parted / partition question lucastic Linux - Hardware 5 12-02-2005 09:58 PM
associate application with directory ukd Linux - Software 0 10-28-2004 11:40 AM
Installing on more than one physical disk Squiddy Slackware 5 11-02-2003 12:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration