LinuxQuestions.org
Help answer threads with 0 replies.
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 02-15-2012, 03:16 PM   #1
svenxix
LQ Newbie
 
Registered: Feb 2012
Distribution: Debian, Fedora
Posts: 24

Rep: Reputation: 0
Explain df output


I'm a little confused with how the output of the df command is being organized. I have a Fedora 15 virtual box with 1 "hard drive". But its listing out a whole bunch of directories even though they are on the same logical volume. Is Fedora just hard coded to always output the /tmp, /var/tmp, /home, /dev separately? There is also three directories listed for the file system tmpfs, /dev/shm, /run, /sys/fs/cgroup, and /media.

Any thoughts guys?
 
Old 02-15-2012, 03:30 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, Ubuntu, SLES, CentOS
Posts: 1,790

Rep: Reputation: 324Reputation: 324Reputation: 324Reputation: 324
@ Reply

Hi svenxix,

Welcome to LQ!!!

df command basically outputs the partition listing. It will display all the partitions that you have created on an hdd. For example if you have created the following partitions on an hdd:

/root
/var
/boot
/testing

Then it will display all these partitions together. df will show you the partition name and the mountpoint that is where they are getting mounted.

Edit: Forgot to mention that it also tell about total disk space, used space and free space

Last edited by T3RM1NVT0R; 02-15-2012 at 03:34 PM.
 
Old 02-15-2012, 03:41 PM   #3
sean.ferguson
LQ Newbie
 
Registered: Feb 2012
Location: Scotland
Distribution: Arch
Posts: 18

Rep: Reputation: Disabled
As T3RM1NVT0R said,

the df command displays the amount of disk space available on each mounted filesystem. You can also use the -h argument which changes the values to 'Human Readable' making it slightly nicer on the eyes.

Starting from left to right, you are shown the mounted filesystem, the total size, used size, size of whats left on the mounted partition, then the usage displayed in a percentage and finally to the far right the actual mount point of the filesystem.

Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/zeus-root
                      322M  133M  173M  44% /
tmpfs                 943M     0  943M   0% /lib/init/rw
udev                  938M  160K  938M   1% /dev
tmpfs                 943M     0  943M   0% /dev/shm
/dev/sda1             228M   16M  201M   8% /boot
/dev/mapper/zeus-home
                       58G  191M   55G   1% /home
/dev/mapper/zeus-tmp  368M   11M  339M   3% /tmp
/dev/mapper/zeus-usr  8.3G  544M  7.3G   7% /usr
/dev/mapper/zeus-var  2.8G  349M  2.3G  14% /var
/dev/sdb1             151G   97G   47G  68% /storage
sferguson@zeus:~$

Last edited by sean.ferguson; 02-15-2012 at 03:42 PM.
 
Old 02-15-2012, 08:00 PM   #4
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,289

Rep: Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034
Best thing is to run 'df -h' as above and post the results in code tags https://www.linuxquestions.org/quest...do=bbcode#code
 
Old 02-15-2012, 08:11 PM   #5
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: /root
Distribution: Slackware & BSD
Posts: 1,218

Rep: Reputation: 231Reputation: 231Reputation: 231
And to add the least: The most profitable way of using 'df' is to employ the most informative switches -a -h and -T as it will return at least the generally useful information concerning the fs.

Quote:
--$ df -ahT
Unlike the common returns from fdisk here df distinguishes between an ext2 and ext3 fs.

Good luck.
 
Old 02-15-2012, 11:17 PM   #6
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Dehradun, Uttarakhand, India
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,413

Rep: Reputation: 303Reputation: 303Reputation: 303Reputation: 303
Checkout this page:

http://www.krishnababug.com/2009/10/...output-du.html

And this one is very old, check this also:

http://www.linuxjournal.com/article/2747
 
1 members found this post helpful.
Old 02-16-2012, 12:28 AM   #7
svenxix
LQ Newbie
 
Registered: Feb 2012
Distribution: Debian, Fedora
Posts: 24

Original Poster
Rep: Reputation: 0
I guess my real question is why are the same logical volumes being printed several times instead of just once? In this example the /tmp, /var/tmp, /home, /dev directories are all located in the same logical volume. Is there a reason it lists the directories individually instead of just listing the single logical volume? There may not be anything significant here, but I'm still trying to digest the linux file system.

Thanks
 
Old 02-16-2012, 12:45 AM   #8
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, Ubuntu, SLES, CentOS
Posts: 1,790

Rep: Reputation: 324Reputation: 324Reputation: 324Reputation: 324
@ Reply

As I mentioned before it displays all the partition and it mount points. The reason it lists the directories individually because those directories are the mount points for the partition. I think it will be better if you could paste the output of df -h so that we can explain it in terms of your system configration.
 
1 members found this post helpful.
Old 01-10-2014, 04:20 AM   #9
adrhc
Member
 
Registered: Dec 2006
Location: Bucharest
Distribution: Linux nsa310 2.6.31.8 #2 Fri Aug 2 11:21:44 CST 2013 armv5tel GNU/Linux
Posts: 30

Rep: Reputation: 12
Quote:
Originally Posted by T3RM1NVT0R View Post
As I mentioned before it displays all the partition and it mount points. The reason it lists the directories individually because those directories are the mount points for the partition. I think it will be better if you could paste the output of df -h so that we can explain it in terms of your system configration.
I'm struggle with the same problem. Take a look at these:
/dev/md0 /etc/zyxel/zy-pkgs ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0
/dev/md0 /usr/local/apache/htdocs/adv,/pkg ext4 rw,noatime,barrier=0,data=writeback,usrquota 0 0

I understand that you (T3RM1NVT0R) mean the above locations (/usr/local/zy-pkgs, /usr/local/apache/htdocs/adv,/pkg) should point/refer/indicate the same location (/dev/md0) but when running "ls -l":

root@nsa310:~# ls -l /etc/zyxel/zy-pkgs
total 12
drwxr-xr-x 2 root root 4096 Feb 6 2013 PHP-MySQL-phpMyAdmin
drwxr-xr-x 2 root root 4096 Oct 18 17:35 anyterm
drwxrwxrwx 2 root root 4096 Oct 19 01:58 ffp
root@nsa310:~# ls -l /usr/local/apache/htdocs/adv,/pkg
total 60
drwxr-xr-x 5 root root 4096 Oct 29 09:09 SMART
-rwxrwxrwx 1 root root 29082 Jul 29 08:35 ZYPKG_LANG_LIST
drwxr-xr-x 5 root root 4096 Oct 18 20:00 angularjs
drwxr-xr-x 2 root root 4096 Nov 12 17:50 ffp
drwxr-xr-x 2 root root 4096 Jan 9 17:34 ffp_0.7_armv5
drwxr-xr-x 9 root root 4096 Dec 20 01:26 photos
drwxr-xr-x 11 root root 4096 Nov 8 02:24 phpmyadmin
drwxr-xr-x 2 root root 4096 Dec 30 10:06 share

the output for the above locations is different; shouldn't it be the same if they both point/refer/indicate the same location (/dev/md0) ?

Last edited by adrhc; 01-14-2014 at 07:03 AM. Reason: up
 
Old 01-20-2014, 07:46 AM   #10
adrhc
Member
 
Registered: Dec 2006
Location: Bucharest
Distribution: Linux nsa310 2.6.31.8 #2 Fri Aug 2 11:21:44 CST 2013 armv5tel GNU/Linux
Posts: 30

Rep: Reputation: 12
root@nsa310:~# df -ahT
Filesystem Type Size Used Avail Use% Mounted on
rootfs rootfs 0 0 0 - /
/proc proc 0 0 0 - /proc
/sys sysfs 0 0 0 - /sys
none usbfs 0 0 0 - /proc/bus/usb
devpts devpts 0 0 0 - /dev/pts
/dev/mtdblock8 yaffs2 48M 39M 9.4M 81% /zyxel/mnt/nand
/dev/sda1 ext2 472M 465M 6.8M 99% /zyxel/mnt/sysdisk
/dev/loop0 ext2 124M 108M 17M 87% /ram_bin
/dev/loop0 ext2 124M 108M 17M 87% /usr
/dev/loop0 ext2 124M 108M 17M 87% /lib/security
/dev/loop0 ext2 124M 108M 17M 87% /lib/modules
/dev/ram0 tmpfs 5.0M 8.0K 5.0M 1% /tmp/tmpfs
/dev/ram0 tmpfs 5.0M 8.0K 5.0M 1% /usr/local/etc
/dev/ram0 tmpfs 5.0M 8.0K 5.0M 1% /usr/local/var
/dev/mtdblock4 yaffs2 10M 1.5M 8.6M 15% /etc/zyxel
/dev/mtdblock4 yaffs2 10M 1.5M 8.6M 15% /usr/local/apache/web_framework/data/config
/dev/md0 ext4 2.7T 1.2T 1.5T 45% /i-data/60cb70cf
/dev/md0 ext4 2.7T 1.2T 1.5T 45% /usr/local/zy-pkgs
/dev/md0 ext4 2.7T 1.2T 1.5T 45% /etc/zyxel/zy-pkgs
/dev/md0 ext4 2.7T 1.2T 1.5T 45% /usr/local/apache/htdocs/adv,/pkg

/dev/sdb2 ext3 917G 388G 483G 45% /e-data/3ebe05e9-b9db-8dd1-a9c7-69017484513c

The above directories have different files; why this happens ?
 
  


Reply

Tags
df


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
ifconfig output explain aamerjavaid Linux - Networking 5 10-28-2011 08:12 AM
Can any one please explain this output? ishandutta2007 Programming 4 06-23-2010 01:16 AM
Could someone please explain this nmap output? stardotstar Linux - Networking 0 02-07-2005 10:02 PM
explain the output suchi_s Programming 9 11-08-2004 09:07 AM
explain the output c pragti Programming 10 05-28-2004 12:17 AM


All times are GMT -5. The time now is 08:25 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration