File access time does not change on some files


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers File access time does not change on some files
# 8  
Old 03-17-2011
Well, I'm surprised. Smilie

Could you post the contents of /etc/fstab?
# 9  
Old 03-17-2011
Code:
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
/dev/sda1       /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=db350323-a657-441e-b8d2-9b472700026a none            swap    sw              0       0

Thanks for any help.
# 10  
Old 03-17-2011
Could you ls -ld the directories the files reside in? I noticed one of them was named "tmp" and am wondering if it had any weird permissions like the sticky bit set on it.

I wouldn't expect that to prevent atimes from working, but that's the only obvious difference I see between the two locations.

ext4 also has some "extended" attributes you can set on files, try lsattr filename to see if anything weird got put on them.

Last edited by Corona688; 03-17-2011 at 01:43 PM..
# 11  
Old 03-17-2011
The ext4 filesystem supports a 'relatime' option to avoid those extraneous small-I/O writes every time you touch a file. This isn't usually a big deal on single-spindle disks, but if you run a large server load on a RAID6 volume, for example, you add a lot of extra I/O for read-modify-write cycles.

One filesystem I've worked with actually had a setting for lazy atime updates, where you could specify granularity to say "If this file has been accessed in the last X hours, don't bother updating it again." This allows you to cut down on extra small I/Os and not break things like HSM batch jobs.

Look in /proc/mounts to see if your root filesystem has the relatime bit set. You can specify atime, relatime, and noatime in /etc/fstab to explicitly set the behavior.

If you really need atime, turn it on. You can do so without unmounting like this: # mount -o remount,atime /

---------- Post updated at 02:10 PM ---------- Previous update was at 02:04 PM ----------

Quote:
Originally Posted by Corona688
ext4 also has some "extended" attributes you can set on files, try lsattr filename to see if anything weird got put on them.
Good point - the "A" attribute can be set on a file or directory to prevent atime updates selectively.

Last edited by LivinFree; 03-17-2011 at 06:22 PM..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Unsure why access time on a directory change isn't changing

Hello... And thanks in advance for any help anyone can offer me I was trying to work out the differences between displaying modify, access, and change times with the 'ls' command. Everything seems in order when I look at files, but the access time on a directory doesn't seem to change when I... (4 Replies)
Discussion started by: bodisha
4 Replies

2. Red Hat

Access time of files and directories

My query please: What I saw how access times of a file and directories work. 1) For a file the access time is the time when I 1st access it after last modification of the file, i.e., if the file is modified at 10 AM and then I access it at 11 AM. After than whenever I access without... (7 Replies)
Discussion started by: ravisingh
7 Replies

3. Red Hat

File access time issue

Hi, I am facing a weird file access time issue on redHat5.x. I have a program which will scan the files in the NFS system and delete files which are older than 4 days, before deleting files program will print the access time of the file. Some of the files are getting deleted which are not older... (1 Reply)
Discussion started by: Satyak
1 Replies

4. UNIX for Dummies Questions & Answers

copy all files matching the request and change the extension at the same time

Hi everyone When I'm starting my script I'm giving to it two parameters: script.sh ext1 ext2 I need to copy all files in a directory fitting ext1, to the same folder, with the same names, but with the changed extension to ext2. Till now I've just managed to do it for only 1 file, but I... (16 Replies)
Discussion started by: vacuity93
16 Replies

5. AIX

Want to find the last access time for large group of files at one go

Dear All, I'm working as a DBA and dont have much knowledge at OS level commands.we have requirement that we need find the files which has been last accessed >= apr 2010and also access date <= apr 2010 for a large set of files.Do know some commands likeistat, ls -u.But can anyone provide me the... (4 Replies)
Discussion started by: dbanrb
4 Replies

6. UNIX for Advanced & Expert Users

How to get access time of a file upto the precision of seconds?

Hi , How can I get the last access time of a file upto the precesion of seconds in Unix. I cannot use stat as this is not supported. (10 Replies)
Discussion started by: kanus
10 Replies

7. Shell Programming and Scripting

need the last access time for a .gz file

i have file named aaaa. The file aaaa was zipped on one particular time. Need to know the command to find out when the file "aaaa" was actually zipped. (1 Reply)
Discussion started by: expert
1 Replies

8. Shell Programming and Scripting

script to change the access permissions of the files

Hi, I want to change the access permissions of the files whose extension is same.For example *.c but these are inside a directory and inside that other directory is there and it contains the .c files..for example-- So my aim is to search the files under src and change the access permissions... (3 Replies)
Discussion started by: smartgupta
3 Replies

9. UNIX for Dummies Questions & Answers

Access time of a file

I thought that access time of a file is time when the file was run last time (or I read somewhere that it's time when system lookup the file -> but I'm not sure when it really is) How is it exactly? Thank you for help! (11 Replies)
Discussion started by: MartyIX
11 Replies

10. HP-UX

HPUX list files with access time more than 5 min

Hi, does anyone know how to find files who have the last access time bigger than 5 min ago, in linux i use: find ./ -amin +5 -type f -maxdepth 1 -name "*.*" but in hp-ux the find command doesn't have the -amin option.... (2 Replies)
Discussion started by: mvrk
2 Replies
Login or Register to Ask a Question