LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-21-2012, 03:22 AM   #1
dinakumar12
Member
 
Registered: Mar 2010
Location: INDIA (chennai)
Distribution: centos
Posts: 271
Blog Entries: 7

Rep: Reputation: 18
directories saved in /var/tmp got deleted automatically


Hi,

My backup script generates backup and a copy of it will be saved in my server's /var/tmp file with date.

But my older backup folders were deleted automatically from /var/tmp.

I have heared that the files in /tmp will be deleted automatically during boot process.

Can anyone explain about /var/tmp directory in which concept the old files were cleared here.
 
Old 01-21-2012, 04:36 AM   #2
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
The /var/tmp directory is made available for programs that require temporary files or directories that are preserved between system reboots. Therefore, data stored in /var/tmp is more persistent than data in /tmp.

Files and directories located in /var/tmp must not be deleted when the system is booted. Although data stored in /var/tmp is typically deleted in a site-specific manner, it is recommended that deletions occur at a less frequent interval than /tmp.

All RHEL-based distros clean /var/tmp of files older than 30 days. I don't know about other distros. Look for a cron entry that invokes tmpwatch. On Fedora/RHEL it is /etc/cron.daily/tmpwatch. It has a line like /usr/sbin/tmpwatch "$flags" 30d /var/tmp or /usr/sbin/tmpwatch 720 /var/tmp. 720 hours = 30 days.
 
1 members found this post helpful.
Old 01-21-2012, 04:39 AM   #3
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
http://linuxers.org/article/differen...tmp-and-vartmp Check this page also...
 
1 members found this post helpful.
Old 01-21-2012, 06:01 AM   #4
dinakumar12
Member
 
Registered: Mar 2010
Location: INDIA (chennai)
Distribution: centos
Posts: 271
Blog Entries: 7

Original Poster
Rep: Reputation: 18
Hi Satyaveer Arya,


Thanks a lot for your reply,and whether all the 30 days old directories in /var/tmp will be cleared or the directories which have date in its name will be deleted.
 
Old 01-21-2012, 08:23 AM   #5
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
All the 30 days old data in /var/tmp directory will be deleted...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to securing /tmp , /var/tmp and /dev/shm hackintosh Linux - Security 7 10-18-2007 12:26 AM
/var/ and /tmp/ directories puishor Linux - General 5 06-25-2005 09:36 AM
kde, /tmp, /var/tmp and all that garba Linux - Software 4 06-17-2005 01:31 PM
Root directories /tmp, /var, /etc ninmonkeys Linux - General 7 11-21-2004 02:49 PM
Newbie question - /tmp /var/tmp Mr happy Linux - Security 3 01-27-2003 02:03 PM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration