The UNIX Forums
"Join the Network of UNIX System Users"


 
Subject: what is so special about /tmp/
Hopper
Newbie
Rank: 1



UID 176
Digest Posts 0
Credits 0
Posts 58
Reading Access 10
Registered Apr 25, 2007
Status Offline
Post at Jun 20, 2007 10:25 AM  Profile | P.M. 
what is so special about /tmp/



what is so special about /tmp/




i know that /tmp is used for memory or swap??? and that it should not be full ??? and that files under /tmp are automatically removed after a reboot???


is this info true???


Top
8everything
Newbie
Rank: 1



UID 32
Digest Posts 0
Credits 0
Posts 38
Reading Access 10
Registered Apr 25, 2007
Status Offline
Post at Jun 20, 2007 10:26 AM  Profile | P.M. 
it depends on the os. some clear it out and others do not. others have /tmp the same as swap and others don't. which os are you asking about?
Top
MD.45
Newbie
Rank: 1



UID 259
Digest Posts 0
Credits 0
Posts 25
Reading Access 10
Registered Apr 25, 2007
Status Offline
Post at Jun 20, 2007 10:26 AM  Profile | P.M. 
thx.
why is it a common practice to create hidden files and directories under /tmp??
Top
forumrating
Newbie
Rank: 1



UID 149
Digest Posts 0
Credits 0
Posts 113
Reading Access 10
Registered Apr 25, 2007
Status Offline
Post at Jun 20, 2007 10:26 AM  Profile | P.M. 
unless we are going to prohibit the use of temporary files, we needed some place that programs can use for temporary files. you can't just create a file anywhere, there may not be enough space and/or the directory permissions may prohibit it. to create a file in say, /a/b/c/something, you must have read and search permission on /a, /a/b, and /a/b/c. some time is required to check all of that, so for overall speed, a place of the form simply /something (that is, some top level directory) is better. now we need a name for "something" and the ancient ones went with /tmp. memory was very tight in the 60's and 70's and this argued for short names. /tmp is as short as you can get while still being somewhat obvious in intent.
Top
 

 

All times are GMT, the time now is Jul 31, 2010 03:24 AM

Powered by Discuz! 5.0.0  © 2001-2006 UNIX Forums
Processed in 0.005142 second(s), 8 queries

Clear Cookies - Contact Us - UNIX Help - Archiver - WAP