|
FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
/tmp is for files that really wouldn't make a difference if they disappear when your system reboots.
/var/tmp is typically for holding files that need to persist between reboots (for example, a temporary "/etc" environment during a make buildworld/buildkernel/installkernel.
__________________
I just saved a bunch of money on my car insurance by fleeing the scene of the accident! |
|
|||
This is explained in hier(7).
|
|
||||
Actually, I've been symlinking /tmp to /var/tmp ever since I use FreeBSD (4 years orso), never had any problems with it.
/tmp gets cleared every day by the periodic(8) script /etc/periodic/daily/110.clean-tmp, there are several options available you can set in /etc/periodic.conf Code:
# 110.clean-tmps daily_clean_tmps_enable="NO" # Delete stuff daily daily_clean_tmps_dirs="/tmp" # Delete under here daily_clean_tmps_days="3" # If not accessed for daily_clean_tmps_ignore=".X*-lock .X11-unix .ICE-unix .font-unix .XIM-unix" daily_clean_tmps_ignore="$daily_clean_tmps_ignore quota.user quota.group" # Don't delete these daily_clean_tmps_verbose="YES" # Mention files deleted
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things. |
|
||||
I've never had problems with symlinking /tmp->/var/tmp either and have used clear_tmp_enable since I first found/heard [of] the option.
__________________
My Journal Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''. |
|
|||
tis, tis, betrayers of Unix tradition.
I use OpenBSD, I know, "There's no place like home". Anyway, nvi stores open files as Berkeley db files in /var/tmp, say you're writing a document and the server crashes.. open reboot the files in /tmp are gone, /var/tmp on the other hand remains. I can't say how wise it is to make the two places one, but, I'm sure you two know what you're doing. (Still, I'd hate to be a user reading hier(7) on your system falling victim to your non-standard /tmp behaviour. ). |
|
||||
I'm not sysadmin.... I use FreeBSD at home.... besides i don't like vi for some specific reasons.....
btw is there any app that writes big files to tmp? Currently i'm reorganizing my disk, and i'm thinking of /var 256M vs 512M top |
|
|||
On my server I have a 2GB /tmp partition, to allow certain users to go "over their quota" if necessary. For that reason, I don't link /tmp with /var/tmp. Although it probably wouldn't be a problem, I don't want the downtime to re-organize the disk and restore from backup
__________________
I just saved a bunch of money on my car insurance by fleeing the scene of the accident! |
|
||||
Quote:
> Is there any reason, i should keep /tmp separate? If there is a good reason for keeping /tmp seperate i doubt if it applies to the typical desktop user. |
|
||||
I just went in BIG problem.....
I did backup my system data..... and then i resized 1st partition, and some slices.... i removed 1 slice.... Now i fail to restore /usr.... with restore -rf /some/backup/file It restores few directories, but no files at all...... it didn't even restore anything in usr/src/* I wonder what did i do wrong..... perhaps i made mistake when i backed up data.... Edit: Huh.... False alarm i just realized that there are not enough space on /tmp when i restore usr from fixit disk...... p.s. i got scared Last edited by graudeejs; 13th July 2008 at 02:21 PM. |
|
||||
Quote:
Quote:
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things. |
|
||||
Quote:
This is a valid reason if you use nvi with the defaults. In my case I use vim for my own files and when working on configuration files as root, I don't leave files in unusable states between saves if I can help it -> whether using nvi, vim, or mg. Quote:
-> hopefully every coder is smart enough to honor $TMPDIR but who says everyone is smart.
__________________
My Journal Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''. |
|
||||
Quote:
Code:
sudo mkdir /home/tmp sudo rm -R /var/tmp sudo ln -s /home/tmp /var/tmp |
|
|