Code: Select all
#!/bin/bash
find /tmp -type f -atime +5 -exec rm {} \\;
Code: Select all
#!/bin/bash
find /tmp -type f -atime +5 -exec rm {} \\;
source: http://tldp.org/LDP/solrhe/Securing-Opt ... sec73.htmlIf a file system has been mounted with this option, reading accesses to the file system will no longer result in an update to the atime information associated with the file like we have explained above. The importance of the noatime setting is that it eliminates the need by the system to make writes to the file system for files which are simply being read. Since writes can be somewhat expensive, this can result in measurable performance gains. Note that the write time information to a file will continue to be updated anytime the file is written to.
"noatime" doesn't mean there is no atime at all. It just means the access time of files isn't updated on access.witek wrote:I don`t understand one thing here: the filesystem in Salix is mounted with noatime option by default. Does it influence find -atime behaviour?
You're specifically mentioning crontab and listing a script that you're proposing to be run from crontab. Not a good idea.witek wrote:@gapan:
As you can read in what I`ve written in the wiki I`m modifying rc.S, not using cron. But I wonder aboyt noatime and find by the way.
Because there is no need to do itwitek wrote:Why isn`t /tmp completely wiped during boot in Salix by default?
I must have been misunderstood: I meant to modify rc.S (crontab is only a possibility not described in my entry). I hope now it reads better.gapan wrote: You're specifically mentioning crontab and listing a script that you're proposing to be run from crontab. Not a good idea.