Sponsored Content
Top Forums UNIX for Advanced & Expert Users Why updating atime doesn't update ctime? Post 302577569 by jim mcnamara on Tuesday 29th of November 2011 10:51:02 AM
Old 11-29-2011
inodes are data about a file in a given filesystem. What is stored in an inode is system dependent, there is no standard.

POSIX compliant systems specifically update ctime (where ever it is kept) only with a change involving:
1. file creation
2. file permissions
3. acl changes
Otherwise ctime would have no meaning because it would be identical to atime. Every read access would update the file status time as well as the access time


Check out the utime() call on your system, or google for 'opengroup.org: utime'. utime() does update ctime.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

atime, ctime, mtime somewhere along csize..

i have used all forms of the unix find command.. and right now this is the only command i can think of that might have this option..: if i use mtime i am looking at a time interval.. but if i wanted to find out intervals of access, change and modification according to when a file changed size... (4 Replies)
Discussion started by: moxxx68
4 Replies

2. Tips and Tutorials

mtime, ctime, and atime

Unix keeps 3 timestamps for each file: mtime, ctime, and atime. Most people seem to understand atime (access time), it is when the file was last read. There does seem to be some confusion between mtime and ctime though. ctime is the inode change time while mtime is the file modification time. ... (2 Replies)
Discussion started by: Perderabo
2 Replies

3. Shell Programming and Scripting

awk updating one file with another, comparing, updating

Hello, I read and search through this wonderful forum and tried different approaches but it seems I lack some knowledge and neurones ^^ Here is what I'm trying to achieve : file1: test filea 3495; test fileb 4578; test filec 7689; test filey 9978; test filez 12300; file2: test filea... (11 Replies)
Discussion started by: mecano
11 Replies

4. Shell Programming and Scripting

how to find ot ctime , mtime ,atime

Can any one tell me how to find out ctime , mtime ,atime for a file/directory on unix. Cheers, Nilesh (5 Replies)
Discussion started by: nilesrex
5 Replies

5. UNIX for Advanced & Expert Users

mtime VS atime VS ctime

hi, in trying to maintain your directories, one needs to do some housekeeping like removing old files. the tool "find" comes in handy. but how would you decide which option to use when it comes to, say, deleting files that are older than 5 days? mtime - last modified atime - last accessed... (4 Replies)
Discussion started by: pinoy43v3r
4 Replies

6. Shell Programming and Scripting

Makefile doesn't update $< variable

Hello guys, I could use advise from more experienced guys about my Makefile. In short, the problem with my Makefile is that $< doesnt change inside my rule. Here is my Makefile: # Makefile for CORE CC = gcc.exe AS = as.exe AR = ar.exe INCLUDE = \ -I../lib/tomcrypt/inc \... (1 Reply)
Discussion started by: Kodreanu
1 Replies

7. UNIX for Dummies Questions & Answers

-atime not working as expected

I need to sort through a volume that contains video files by access time and delete files that have not been accessed over x days. I have to use the access time as video files are originals that do not get modified, just read Testing commands on a local test folder... $ date Wed Sep 28... (10 Replies)
Discussion started by: canon273
10 Replies

8. AIX

AIX 6.1 TL8 update : bos.aso doesn't install.

Hello. An update of TL from TL7 to TL8 is ending with errors : Requisite Failures ------------------ SELECTED FILESETS: The following is a list of filesets that you asked to install. They cannot be installed until all of their requisite filesets are also installed. See subsequent... (4 Replies)
Discussion started by: stephnane
4 Replies

9. Solaris

Zfs - what does atime update?

It is widely documented that on zfs atime updates the access time on zfs. Where is the access time updated on Solaris 11.2? If I create file atimetest.txt under rpool/export/home: # zfs list rpool/export/home NAME USED AVAIL REFER MOUNTPOINT rpool/export/home 13.3G ... (5 Replies)
Discussion started by: jabberwocky
5 Replies
FSDB(8) 						    BSD System Manager's Manual 						   FSDB(8)

NAME
fsdb -- FFS debugging/editing tool SYNOPSIS
fsdb [-d] [-f] [-r] fsname DESCRIPTION
The fsdb utility opens fsname (usually a raw disk partition) and runs a command loop allowing manipulation of the file system's inode data. You are prompted to enter a command with fsdb (inum X)> where X is the currently selected i-number. The initial selected inode is the root of the file system (i-number 2). The command processor uses the editline(3) library, so you can use command line editing to reduce typing if desired. When you exit the command loop, the file system superblock is marked dirty and any buffered blocks are written to the file system. The following options are available: -d Enable additional debugging output (which comes primarily from fsck(8)-derived code). -f Left for historical reasons and has no meaning. -r Open the file system read/only, and disables all commands that would write to it. COMMANDS
Besides the built-in editline(3) commands, fsdb supports these commands: help Print out the list of accepted commands. inode i-number Select inode i-number as the new current inode. back Revert to the previously current inode. clri i-number Clear i-number. lookup name cd name Find name in the current directory and make its inode the current inode. Name may be a multi-component name or may begin with slash to indicate that the root inode should be used to start the lookup. If some component along the pathname is not found, the last valid directory encountered is left as the active inode. This command is valid only if the starting inode is a directory. active print Print out the active inode. blocks Print out the block list of the active inode. Note that the printout can become long for large files, since all indirect block pointers will also be printed. findblk disk_block_number ... Find the inode(s) owning the specified disk block(s) number(s). Note that these are not absolute disk blocks numbers, but offsets from the start of the partition. uplink Increment the active inode's link count. downlink Decrement the active inode's link count. linkcount number Set the active inode's link count to number. ls List the current inode's directory entries. This command is valid only if the current inode is a directory. rm name del name Remove the entry name from the current directory inode. This command is valid only if the current inode is a directory. ln ino name Create a link to inode ino under the name name in the current directory inode. This command is valid only if the current inode is a directory. chinum dirslot inum Change the i-number in directory entry dirslot to inum. chname dirslot name Change the name in directory entry dirslot to name. This command cannot expand a directory entry. You can only rename an entry if the name will fit into the existing directory slot. chtype type Change the type of the current inode to type. Type may be one of: file, dir, socket, or fifo. chmod mode Change the mode bits of the current inode to mode. You cannot change the file type with this subcommand; use chtype to do that. chflags flags Change the file flags of the current inode to flags. chown uid Change the owner of the current inode to uid. chgrp gid Change the group of the current inode to gid. chgen gen Change the generation number of the current inode to gen. btime time mtime time ctime time atime time Change the creation (birth), modification, change, or access time (respectively) on the current inode to time. Time should be in the format YYYYMMDDHHMMSS[.nsec] where nsec is an optional nanosecond specification. If no nanoseconds are specified, the birthnsec, mtimensec, ctimensec, or atimensec field will be set to zero. Note that btime is available on UFS2 file systems only. quit, q, exit, <EOF> Exit the program. SEE ALSO
editline(3), fs(5), clri(8), fsck(8) HISTORY
The fsdb utility uses the source code for fsck(8) to implement most of the file system manipulation code. The remainder of fsdb first appeared in NetBSD, written by John T. Kohl. Peter Wemm ported it to FreeBSD. BUGS
Manipulation of ``short'' symlinks has no effect. In particular, one should not try changing a symlink's type. You must specify modes as numbers rather than symbolic names. There are a bunch of other things that you might want to do which fsdb does not implement. WARNING
Use this tool with extreme caution--you can damage an FFS file system beyond what fsck(8) can repair. BSD
August 24, 2006 BSD
All times are GMT -4. The time now is 05:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy