[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: date problem with ls -la --time=ctime
- From: Michael Kearey <mkearey redhat com>
- To: "Discussion of Red Hat Enterprise Linux 3 (Taroon)" <taroon-list redhat com>
- Subject: Re: date problem with ls -la --time=ctime
- Date: Mon, 18 Apr 2005 21:23:16 +1000
On Mon, 2005-04-18 at 12:57 +0200, Rainer Traut wrote:
> Hi,
>
> we are running Domino 6.53 on el3 u4.
> Due to the way domino's java detachs and attachs file from the databases
> we see many tmp files in our tmp dir.
> We haven't found a way around so far other than deleting them via a cron
> job.
>
> I wanted to run this every two hours, delete all tmp files not accessed
> within the last 15 minutes.
>
> Here is the strange behaviour:
>
> [root asp5 tmp]# ls -la /tmp/eo-1528902312tm
> -rw-rw-r-- 1 notes notes 628155 15. Apr 15:49
> /tmp/eo-1528902312tm
> [root asp5 tmp]# ls -la /tmp/eo-1528902312tm --time=status
> -rw-rw-r-- 1 notes notes 628155 18. Apr 12:34
> /tmp/eo-1528902312tm
> [root asp5 tmp]# ls -la /tmp/eo-1528902312tm --time=atime
> -rw-rw-r-- 1 notes notes 628155 18. Apr 12:39
> /tmp/eo-1528902312tm
> [root asp5 tmp]# ls -la /tmp/eo-1528902312tm --time=access
> -rw-rw-r-- 1 notes notes 628155 18. Apr 12:39
> /tmp/eo-1528902312tm
> [root asp5 tmp]# ls -la /tmp/eo-1528902312tm --time=use
> -rw-rw-r-- 1 notes notes 628155 18. Apr 12:39
> /tmp/eo-1528902312tm
> [root asp5 tmp]# ls -la /tmp/eo-1528902312tm --time=ctime
> -rw-rw-r-- 1 notes notes 628155 18. Apr 12:34
> /tmp/eo-1528902312tm
> [root asp5 tmp]#
>
> Question is, what time does ls -la show?
> The man page says 'change time', so ctime?
Hi,
ls -lt -c should show time of last modification of file status
information
ls -lt -u should show the last accessed time.
I am not sure how critical it is to do this for files with '15 minutes
since atime or ctime', but, I'd look at tmpwatch. It has a time
resolution of 1 hour only though.
The file /etc/cron.daily/tmpwatch will show a hint how to use it. You
could set up cron to run tmpwatch over a particular directory and set
the application to use that directory for it's 'cache'
Cheers,
Michael
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]