Find the answer to your Linux question:
Results 1 to 7 of 7
I feel stupid asking this but what is /tmp? Temporary? I just read some Ubuntu's tips and tricks and I found out a way to clear out your /tmp folder ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User George Harrison's Avatar
    Join Date
    Mar 2005
    Location
    Pepperland
    Posts
    445

    /tmp


    I feel stupid asking this but what is /tmp? Temporary? I just read some Ubuntu's tips and tricks and I found out a way to clear out your /tmp folder everytime you reboot the machine or log out. Is this dangerous to do? Is there special stuff in my /tmp folder that is vital for the system to run? I'm almost positive it means that it is a temp folder but I am not quite for sure, if that is the case then I guess it would be ok to clear it out.
    Registered Linux user #393103

  2. #2
    Linux Guru dylunio's Avatar
    Join Date
    Aug 2004
    Location
    Cymru
    Posts
    4,157
    Yes it is tepmrary (as for as I know) since if you e.g. find a .pdf file on the web which you want to read, but not save it will be downloaded to /tmp for the pdf viewer to read. Also some package managers compile source in /tmp so that it doesn't waste valuble space. As far as I know it is safe to clear /tmp, since any program that needs a file there will create it if it is not there
    Registered Linux User #371543!
    Get force-get May The Source Be With You
    /dev/null
    /dev/null2

  3. #3
    Linux Guru
    Join Date
    May 2004
    Location
    forums.gentoo.org
    Posts
    1,817
    From The Linux Documentation Project: http://www.tldp.org/LDP/Linux-Filesy.../html/tmp.html
    /IMHO
    //got nothin'
    ///this use to look better

  4. #4
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    6,133
    Yep it's all temp crap, you'll notice when you start kde it will hav a bunch of directories dumped in there. Lilo too has an option to clear tmp on boot(or at least is portrayed that way in Mandriva). To be honest I often clear it when I'm up and running. Users have full write access here usually for this purpose.

  5. #5
    Linux Newbie
    Join Date
    Jul 2005
    Location
    Turn Around
    Posts
    202
    some websites u go to frequently may not load up as fast if u always clear ur temp cache, i believe...

  6. #6
    Linux Engineer
    Join Date
    Nov 2004
    Location
    home
    Posts
    796
    Files in /tmp should not be touched unless you know exactly what they are for and what they are doing. Lock files might be in /tmp, some programs rely on the use of /tmp and it expects it's files to be there when it looks. PostgreSQL for example uses /tmp, and deleting a certain file from there could break it (or at least require you to restart the server). Things in /tmp are temporary though, anything that uses /tmp needs to expect that /tmp will be empty on boot and that files not used for long periods of time may be deleted. Most distros at least delete /tmp on boot and/or shutdown. Some distros do check files in /tmp and delete those which haven't been used for a long time. But in general, do not touch /tmp.

  7. #7
    Just Joined!
    Join Date
    Mar 2012
    Posts
    4
    Quote Originally Posted by valan View Post
    Files in /tmp should not be touched unless you know exactly what they are for and what they are doing. Lock files might be in /tmp, some programs rely on the use of /tmp and it expects it's files to be there when it looks. PostgreSQL for example uses /tmp, and deleting a certain file from there could break it (or at least require you to restart the server). Things in /tmp are temporary though, anything that uses /tmp needs to expect that /tmp will be empty on boot and that files not used for long periods of time may be deleted. Most distros at least delete /tmp on boot and/or shutdown. Some distros do check files in /tmp and delete those which haven't been used for a long time. But in general, do not touch /tmp.
    Just google'd a question and this was the first search result. Thanks for the info!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •