![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| file permission/acl: 2 users with write access on 1 file... | elzalem | Security | 0 | 08-28-2008 02:25 AM |
| Processing a log file based on date/time input and the date/time on the log file | primp | Shell Programming and Scripting | 4 | 03-16-2008 08:23 AM |
| [C++] File I/O (Reading from a Random-Access File) | VersEtreOuNe | High Level Programming | 0 | 02-12-2008 01:34 PM |
| HPUX list files with access time more than 5 min | mvrk | HP-UX | 2 | 08-22-2005 07:01 AM |
| HOw I can Know who Access my file!! | geoquest | UNIX for Dummies Questions & Answers | 3 | 06-19-2002 03:10 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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! |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
It's the time a process last accessed it to read/write contents.
|
|
#3
|
||||
|
||||
|
Quote:
im sure that tail (awk, head, and surely more) dont change it |
|
#4
|
|||
|
|||
|
2Broli: Well and what is the access time for then? I mean if behaviour of programs is different..
|
|
#5
|
|||
|
|||
|
From the POSIX standards:
Quote:
st_ctime == ctime st_mtime == mtime Plus if you search the forum for file time you will find a lot of good information. Broli - the definitions of these have been fixed for years - different apps do not violate those definitions. Things that can change mtime are opening a file for write/append or a call to utime() (e.g., touch). chmod or chown changes ctime, and utime or opening a file for read changes the atime. These values are NOT part of the file, they are file metadata maintained by the filesystem, as accessed thru the kernel. Last edited by jim mcnamara; 09-04-2008 at 07:08 AM. |
|
#6
|
|||
|
|||
|
I made a simple script and copied the output:
Code:
file=example_1.sh;stat $file; cat $file >/dev/null; stat $file Code:
File: `example_1.sh' Size: 918 Blocks: 2 IO Block: 4096 regular file Device: fh/15d Inode: 2099578354 Links: 1 Access: (0744/-rwxr--r--) Uid: (13654/vsetm7am) Gid: ( 200/ nofiles) Access: 2008-09-02 21:47:11.000000000 +0200 Modify: 2008-09-02 21:47:11.000000000 +0200 Change: 2008-09-02 21:47:11.000000000 +0200 File: `example_1.sh' Size: 918 Blocks: 2 IO Block: 4096 regular file Device: fh/15d Inode: 2099578354 Links: 1 Access: (0744/-rwxr--r--) Uid: (13654/vsetm7am) Gid: ( 200/ nofiles) Access: 2008-09-02 21:47:11.000000000 +0200 Modify: 2008-09-02 21:47:11.000000000 +0200 Change: 2008-09-02 21:47:11.000000000 +0200 |
|
#7
|
||||
|
||||
|
We would need to know the OS and how the file system was mounted. As one example: Sun's mount_ufs man page documents the noatime option: Quote:
|
||||
| Google The UNIX and Linux Forums |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|