Unix Technical Forum

three different times of a file

This is a discussion on three different times of a file within the Sun Solaris Administration forums, part of the Solaris Operating System category; --> Hello, maybe someone could explain this to me. I'm curious about the three different times the ls command shows ...


Go Back   Unix Technical Forum > Unix Operating Systems > Solaris Operating System > Sun Solaris Administration

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-12-2008, 06:10 AM
Wolfgang Mair
 
Posts: n/a
Default three different times of a file

Hello,

maybe someone could explain this to me. I'm curious about the three
different times the ls command shows to me. What I've learned from the
man page so far is:
ls -lu -- shows time of last access
ls -lc -- shows time of last modification of the inode

so, this is clear for me. But what time shows the ls -l command?

f.e.:
#ls -l xxx.html
-rw-rw-r-- 1 woma test 9886 Jun 23 16:17 xxx.html
#ls -lu xxx.html
-rw-rw-r-- 1 woma test 9886 Jul 17 08:32 xxx.html
#ls -lc xxx.html
-rw-rw-r-- 1 woma test 9886 Jul 11 13:15 xxx.html
#

And which time would be important for a incremental backup

Thank you

Wolfgang

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-12-2008, 06:10 AM
Anthony Greaud
 
Posts: n/a
Default Re: three different times of a file

Wolfgang Mair wrote:
>
> Hello,
>
> maybe someone could explain this to me. I'm curious about the three
> different times the ls command shows to me. What I've learned from the
> man page so far is:
> ls -lu -- shows time of last access
> ls -lc -- shows time of last modification of the inode
>
> so, this is clear for me. But what time shows the ls -l command?
>
> f.e.:
> #ls -l xxx.html
> -rw-rw-r-- 1 woma test 9886 Jun 23 16:17 xxx.html
> #ls -lu xxx.html
> -rw-rw-r-- 1 woma test 9886 Jul 17 08:32 xxx.html
> #ls -lc xxx.html
> -rw-rw-r-- 1 woma test 9886 Jul 11 13:15 xxx.html
> #
>
> And which time would be important for a incremental backup
>
> Thank you
>
> Wolfgang



Hi,

three timestamps exist for a file :
- the "atime" : time the file was last accessed (typically read)
- the "ctime" : time the file was last changed (i.e. datas in the file were changed)
- the "mtime" : time the inode of file was last modified : datas were changed (i.e. mtime and ctime are changed together) or inode was changed (changing owner, group, permissions, ..., changes the mtime.

Backup tools are usually based on mtime, which one can easily understand as mtime reflects all possible changes made to a file.

Be careful : some tools, as Netbackup, change mtime when backuping (by default, NBU saves atime and mtime, then backups the file - which modifies the atime, as backup is a read operation - and then restore the atime and mtime to the file, which modifies the ctime ...). Such a behaviour can be changed using the following options in bp.conf :

USE_CTIME_FOR_INCREMENTALS
DO_NOT_RESET_FILE_ACCESS_TIME

Hope tis helps,
Anthony
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-12-2008, 06:11 AM
Horst Scheuermann
 
Posts: n/a
Default Re: three different times of a file

In <HI5v3J.GH7@approve.se> hoh@invalid.invalid (Goran Larsson) writes:

> Wrong, this is "mtime". The "ctime" is when file status was last
> changed. Changed by the following functions: chmod(), chown(), creat(),
> link(2), mknod(), pipe(), unlink(2), utime(), and write().


acl()
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:28 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com