Architecting, installing and maintaining your SAS environment

Finding out when last a file was accessed.

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

Finding out when last a file was accessed.

Hello,

 

How do I go about finding out when last a file was accessed(Read)? We can find out when last it was written or modified but not read.

- We do not have Environment Manager enabled.

- We are on Linux Suse

- One Linux Suse server

 

thanks,


Accepted Solutions
Solution
‎06-29-2017 05:41 AM
Super User
Posts: 6,942

Re: Finding out when last a file was accessed.

ls -ul filename

is the UNIX command to display the last access timestamp of a file.

Be aware that this might not really tell you much, as each complete backup will read the file.

And everytime someone uses sashelp.vtable or sashelp.vcolumn every table in every currently assigend library will be read.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers

View solution in original post


All Replies
Solution
‎06-29-2017 05:41 AM
Super User
Posts: 6,942

Re: Finding out when last a file was accessed.

ls -ul filename

is the UNIX command to display the last access timestamp of a file.

Be aware that this might not really tell you much, as each complete backup will read the file.

And everytime someone uses sashelp.vtable or sashelp.vcolumn every table in every currently assigend library will be read.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
New Contributor
Posts: 3

Re: Finding out when last a file was accessed.

Thanks Kurt. This helps.

Frequent Contributor
Posts: 117

Re: Finding out when last a file was accessed.

[ Edited ]

Very useful. There is also the stat / istat commands to display the same information taken out from the filesystem  with the 3 three components of timestamp. Linux stat might offer some additonal functionality fbeing able to

customise the output sometimes, reducing the amount of information.

 

eg, istat command for AIX 7.1 (IBM Unix)

 

https://www.ibm.com/support/knowledgecenter/en/ssw_aix_71/com.ibm.aix.cmds3/istat.htm

 

  • Date of the last i-node update ("physical storage information")
  • Date of the last file modification
  • Date of the last reference to the file  ("last access") 
New Contributor
Posts: 3

Re: Finding out when last a file was accessed.

Thanks Ronan. This is very helpful indeed Smiley Happy

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 254 views
  • 2 likes
  • 3 in conversation