0

I’m very new on using Linux (Debian) and have following question. I installed debian and during the process also created separate partition for /tmp. How can I now make sure that server programs use that special partition /tmp instead of /tmp folder under /root partition?

Mark
  • 9
  • 1
  • 1
    http://unix.stackexchange.com/questions/41336/where-do-the-files-go-if-you-mount-a-drive-to-a-folder-that-already-contains-fil/41337#41337 – poige Dec 16 '12 at 13:46

1 Answers1

1

You're probably referring to just a /tmp folder under the / partition (seen a lot). But it your case, /tmp is not just a directory under the / partition, it's a seperate mount point (just like / is the root mountpoint).

In other words, the /tmp you see is not a sub-directory of /, it's a seperate partition on your hard disk that can just be accessed through this path. You can see it as a sort of shortcut to that part on your harddisk. Filling up the /tmp will not affect the disk space usage of your / partition.

If you run cat /etc/fstab (which is the filesystem table file, holding all of your partition data) you can check out what your partitions are configured like and you should see /tmp as a seperate line.

Oldskool
  • 2,025
  • 1
  • 16
  • 27
  • Thank you for quick answere, doing cat /etc/fstab gave this output: proc /proc proc defaults 0 0 none /dev/pts devpts gid=5,mode=620 0 0 /dev/md0 none swap sw 0 0 /dev/md1 /boot ext3 defaults 0 0 /dev/md2 / ext3 defaults 0 0 /dev/md3 /tmp ext3 defaults 0 0 /dev/md4 /vz ext3 defaults 0 0 – Mark Dec 16 '12 at 13:16
  • The line `/tmp ext3 defaults 0 0` means that `/tmp` is indeed a seperate partition, so every application will use that partition and won't fill up your primary partition. – Oldskool Dec 16 '12 at 13:19
  • OK, so programs will use that partition by default without me needing to edit anything? thank you for clearing it! – Mark Dec 16 '12 at 13:24