LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Question about Disk Space vs. /tmp space (https://www.linuxquestions.org/questions/linux-newbie-8/question-about-disk-space-vs-tmp-space-4175492320/)

arcolombo698 01-23-2014 12:58 PM

Question about Disk Space vs. /tmp space
 
Hello.

I have a question regarding computer space.

so I am in need of computer disk space (Harddrive space) of 100gb. From the available resources I read that the system has /tmp space of 250GB ...

So I am wondering what the difference is when they provide information about the /tmp disk space.
and disk space hard drive.

So the /tmp space is the temporary storage that stores temporary data, and when jobs complete, the tmp is cleared.\\
the disk space, actually preserves and stores this data.

True?

jailbait 01-23-2014 01:51 PM

The /tmp space is used as a scratch work area. Files in /tmp are usually cleaned out occasionally. My system deletes all files in /tmp on each boot in case a program finished without cleaning up its files in /tmp (or a system crash can leave files in /tmp).

The relationship between available disk space and space available in /tmp depends on your partition arrangement. Some people create a separate partition for /tmp. That way a run away program using /tmp space cannot use up all available disk space. A run away program can only use up all of /tmp space. When /tmp is a separate partition then the free disk space in the / partition (and other partitions such as /home) is a separate thing from the space in the /tmp partition.

When /tmp is located in the / partition then the free disk space in / is available for use by /tmp or any other files that you want to create in the / partition. In this case it is possible for a run away program using /tmp files to use up all of the free space in the / partition.

Other partitions that you might create are /home and /var. If a user run program runs away creating files then it can only use up all of the space in the /home partition. If a program runs away issuing log messages then it can fill up the entire /var partition with log messages.

If you choose to create separate partitions for /tmp or any other directory then you have to allocate enough space for that partition that it won't fill up in normal usage. So to answer your question you need to know how much free space you have in each of your partitions to see if you have the partitions allocated correctly.

--------------------
Steve Stites

suicidaleggroll 01-23-2014 02:12 PM

If you post the output of "fdisk -l", "mount" and "df -h" it will help us understand your current partition layout.

No Linux installer would ever assign /tmp its own 250GB partition, so either you're not reading the output correctly or you manually partitioned your system during installation and decided to give /tmp an unreasonably huge amount of space.


All times are GMT -5. The time now is 08:59 AM.