/dev/sda1, /tmp,/dev/shm

0

I'm actually putting some files into temporary folder /tmp. And I want to know the capacity of /tmp. I do the 'df -h':

Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              52G   11G   39G  22% /
tmpfs                 7.9G     0  7.9G   0% /dev/shm

So what's the capacity of /tmp folder?

Actually I'm a little bit confused about these concepts:

/dev/sda1
 /tmp
/dev/shm
tmpfs

I bet the first two are disk; while the third is memory, right?

thx

LookIntoEast

Posted 2011-09-13T23:46:26.883

Reputation: 101

Answers

0

Filesystem maps to the physical hardware you use for your filesystems. In UNIX everything is more or less represented as a file, so your /dev/sda1 is nothing more than your hard drive. You can use udevinfo -q all -n /dev/sda1 to get more information about it if you're curious.

tempfs is a little different. It's a filesystem that is made from a block of your RAM, but besides that, the principle is the same.

The "mounted on" directory tells you where the files stored on the Filesystem devices are mapped to in your directory structure. So everything stored in /dev/sda1 is accessible from / while everything in tempfs is available in /dev/shm.

Since /tmp is mounted as part of / which is part of /dev/sda1, you have 39G free on the filesystem that /tmp is part of.

The best way to check for free space is to run df directly on the directory you are curious about:

df -h /tmp

Swiss

Posted 2011-09-13T23:46:26.883

Reputation: 476

Not to be nitpicky, but /dev/sda1 is a partition on the drive /dev/sda would be the drive. – OldWolf – 2011-09-14T02:36:30.493