Results 1 to 7 of 7
Hi guys, I wonder if it is possible to change the default user /tmp folder in suse 10.2. I checked the env variables but there is none that would define ...
- 09-19-2008 #1Linux Newbie
- Join Date
- Feb 2006
- Location
- Slovenia
- Posts
- 162
How to change tmp folder location?
Hi guys, I wonder if it is possible to change the default user /tmp folder in suse 10.2. I checked the env variables but there is none that would define where the temp folder is. The reason for doing this is, that when I am extracting large compressed rar files cca 10GB I get an error saying something like "cant write do destination folder", so instead of increasing my home parition which is about 20GB large, I thought of moving the tmp to folder to another bigger partition. Any help is welcome, thanks.
- 07-28-2009 #2Just Joined!
- Join Date
- Jul 2009
- Posts
- 3
Any Luck
Did you find a solution to this? I was hoping to move my users tmp file to the root directory so they can't delete it
- 07-29-2009 #3Linux Guru
- Join Date
- Jan 2009
- Location
- Dover, NH
- Posts
- 1,633
You can either mount a different drive to /usr/tmp, or you can replace it with a symlink (ln -s) to another location with more space. Any locale change you make to any tmp dirs (/tmp, /usr/tmp, or /var/tmp), make it from a reboot in single mode so you don't bork a running app.
- 07-29-2009 #4Just Joined!
- Join Date
- Jul 2009
- Posts
- 3
If i use a symbolic link that will transfer where the tmp files are going but wont I still have the actual "tmp" directory? I was hoping to move that because i'm afraid its going to get deleted (i'm making a distro for old people)
- 07-29-2009 #5Linux Guru
- Join Date
- Jan 2009
- Location
- Dover, NH
- Posts
- 1,633
You have to delete (or move) the original folder prior to making the symlink to the new location. Otherwise ln will simply reply File or Folder already exists.
This is why I suggest you do it in single user mode, or at least without X running. It would be something along the lines of:
mv /tmp /mnt/new/location/tmp
ln -s /mnt/new/location/tmp /tmp
It has to be as root and none of the files under tmp can be in use at the time.
Also, if you create (as opposed to move) a new folder to redirect tmp, make sure it has universal read/write/execute privileges (777). A temp folder is no good if the user can't write to it.
- 07-30-2009 #6
I think you can also do something like
Code:export TEMPDIR=/new/temp/dir
- 07-30-2009 #7Linux Guru
- Join Date
- Jan 2009
- Location
- Dover, NH
- Posts
- 1,633
That should work for programs you're compiling from source and maybe many others, but I'm haunted by the feeling that the very existence of three tmp folders (which are sometimes symlinked to one physical folder) suggests that there are programs where the expected location of a tmp folder is hard encoded. The symlink(s) would be the most effective way to deal with these.


Reply With Quote