linux df command
Is there a way to run some command (maybe df) under linux RedHat 7 to display the memory used for the file system. When i do df, it simply shows me the hard disk partitioning space, but i need to see what the file system space allocation is.
For example i need to see this: (This was done on unix Solaris) $ df / (/dev/dsk/c0t0d0s0 ): 525518 blocks 291846 files /usr (/dev/dsk/c0t0d0s6 ):13617292 blocks 1600490 files /proc (/proc ): 0 blocks 29913 files /dev/fd (fd ): 0 blocks 0 files /etc/mnttab (mnttab ): 0 blocks 0 files /var/run (swap ): 2999904 blocks 218303 files /tmp (swap ): 2999904 blocks 218303 files /export/home (/dev/md/dsk/d0 ):12725334 blocks 3021243 files /usr/old-basecode (/dev/dsk/c2t5d0s7 ):43155254 blocks 3021401 files /usr/old-develop (/dev/dsk/c2t5d1s7 ):96311384 blocks 6381718 files /usr/develop (condor:/develop1 ):1058587144 blocks 144717366 files /snap (condor:/home1 ):1058587144 blocks 144717366 files /home/mysql (condor:/home1/mysql):1058587144 blocks 144717366 files /home/rgb (condor:/home1/rgb ):1058587144 blocks 144717366 files /usr/basecode (condor:/basecode1 ):1058587144 blocks 144717366 files /home/greg (condor:/home1/greg):1058587144 blocks 144717366 files I need to see similar under linux. TIA. |
df -h /filesystem/to/check/ (human readable)
or df -k /filesystem/to/check/ (in kilobytes) I usually just navigate to the filesystem I want to see and type " df -h . " to see its usage. |
This is what i get when i do what you said, still tells me the space of /dev/hda3, not the spae of /tmp
[greg@localhost tmp]$ df -h /tmp Filesystem Size Used Avail Use% Mounted on /dev/hda3 72G 7.3G 61G 11% / |
Quote:
df -> report filesystem disk space usage du-> estimate file space usage try Code:
du -hs /tmp |
Code:
du / -h Code:
du /usr -h --max-depth=1 |
Sorry bout that. I was wrong about the last argument. But you can type df -h to see similar output for all filesystems on your machine. At least on Solaris 8 it does that :)
Cheers. |
So does that give me the size of current directory or the allocated space for it.
Like i tried those commands and it give me this: [root@localhost /]# du -h /tmp 8.0K /tmp/orbit-root 4.0K /tmp/.iroha_unix 4.0K /tmp/.font-unix 4.0K /tmp/.X11-unix 4.0K /tmp/.ICE-unix 4.0K /tmp/ssh-KhqC4076 4.0K /tmp/.esd 40K /tmp What do these numbers mean. I'm mainly interested in how much space linux allocates to /tmp or /usr directory and how much of it have I used up. Yes azucaro, df works that way in Solaris under unix, but seems to be different in linux. |
Quote:
If you read my post you shall see a "du -hs /tmp" Quote:
|
but how do i know what is the limit for the /tmp or /usr
Doesn't linux put caps on them |
Quote:
If you want to limit it you may put quota in the users. |
All times are GMT -5. The time now is 09:32 AM. |