LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-23-2003, 11:56 PM   #1
k4zau
Member
 
Registered: Feb 2003
Location: huntsville, al
Distribution: debian, opensolaris
Posts: 99

Rep: Reputation: 15
displaying file access times in console


ls -l only displays the modification time for files, right? i want to be able to see the time a file was last accessed without using one of KDE's tools. is there a command that shows all the known information for an individual file?
 
Old 10-24-2003, 12:24 AM   #2
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
ls -lu shows access time. I don't think there's any single option that shows *everything* at once - that'd be a lot of stuff.
 
Old 10-24-2003, 11:36 AM   #3
k4zau
Member
 
Registered: Feb 2003
Location: huntsville, al
Distribution: debian, opensolaris
Posts: 99

Original Poster
Rep: Reputation: 15
thanks, that gave me the info i needed. ls -lu works fine for that purpose.
i'm going to write a shell script to make it quicker to do.

i looked in O'Reilly's "Linux in a Nutshell" and apparently there is a command called 'stat' that displays all the inode information for a given file, including modification and access times. although it doesn't seem to be on my system.
 
Old 10-24-2003, 07:28 PM   #4
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Sure is. Thanks in return. In Slack it's part of coreutils-5.0 and is in /usr/bin. One day I'll actually know what every file on the system does. Heh.

Output looks like so

Code:
  File: `statfile'
  Size: 0               Blocks: 0          IO Block: 4096   regular empty file
Device: 344h/836d       Inode: 4135        Links: 1    
Access: (0600/-rw-------)  Uid: ( 1000/       user)   Gid: (  100/   users)
Access: 2003-10-24 20:26:27.000000000 -0400
Modify: 2003-10-24 20:26:27.000000000 -0400
Change: 2003-10-24 20:26:27.000000000 -0400
 
Old 10-26-2003, 10:48 PM   #5
k4zau
Member
 
Registered: Feb 2003
Location: huntsville, al
Distribution: debian, opensolaris
Posts: 99

Original Poster
Rep: Reputation: 15
glad to know that it actually exists. it seems to me that redhat doesn't include all the little console apps that any decent Unix system would. i have an old 486 box at home running Slack 8.1 and i remember using a lot of utilities on it that are nowhere to be found on my redhat machine. thanks for the tip.
 
  


Reply



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
Unable to Access Database Multiple Times tjherman Linux - Software 0 10-25-2004 11:17 AM
Console not displaying after new kernel cernos Linux - Laptop and Netbook 2 08-07-2004 01:19 AM
iptables : Restrict access at certain times of day J-Ben Linux - Newbie 1 03-28-2004 09:38 PM
displaying file permissions Imyrryr Linux - Newbie 6 10-18-2003 10:06 PM
Displaying a certain line in a file. Mike_the_Man Linux - General 1 03-02-2001 10:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:51 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
Open Source Consulting | Domain Registration