LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-25-2004, 06:00 AM   #1
warney_out
LQ Newbie
 
Registered: Sep 2004
Posts: 10

Rep: Reputation: 0
stat


how to find from a program if a file has been accessed or not.....i am using linux
 
Old 09-28-2004, 03:37 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Tribblix, Ubuntu/WSL
Posts: 9,774

Rep: Reputation: 469Reputation: 469Reputation: 469Reputation: 469Reputation: 469
"ls -lu file" gives you the last time a file has been accessed.
You can do the same by using one of the stat system calls and look at the
st_atime field.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Use of stat() in C rblampain Programming 3 06-02-2005 06:41 AM
cannot stat DAChristen29 Linux - Software 1 05-23-2005 05:54 PM
Cannot stat??? chui_yap Linux - Newbie 1 01-04-2005 06:56 PM
cannot stat scottsteibel Linux - Newbie 2 12-11-2004 03:51 PM
Linux stat to Windows Stat sridurai Programming 3 09-24-2004 04:07 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration