5/25/2013

Linux: How to time that file was Changed, Modified or Accessed?

The Linux shell command to see or retrieve what time a file was changed is "stat".
ex. 
stat yourFileName.here
 [yourPrompt]# stat yourFileName.here
  File: `yourFileName.here'
  Size: 219             Blocks: 8          IO Block: 4096   regular file
Device: dh/3d  Inode: 30229777    Links: 1
Access: (0644/-rw-r--r--)  Uid: (  500/ownerName)   Gid: (  500/groupName)
Access: 2010-04-26 13:13:59.000000000 -0400
Modify: 2010-04-26 13:13:59.000000000 -0400
Change: 2013-05-24 18:04:27.000000000 -0400

You can also get results for multiple files using standard shortcut conventions.
ex. 
stat yourFile*
In this case, the stat command reveals that someone Changed a file yesterday, but the Modify and Access dates were not changed. 

Very clever bad boys out there....

Apparently, one may change the modification  date by using the "touch" command.

No comments :

Post a Comment