activity on a file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting activity on a file
# 1  
Old 08-13-2006
activity on a file

is there anyway to tell when an activity is happening on a file.

i'm talking about something deeper than what ls -l can give.

when i say activity, i want to know exactly when any commands was run on a specific file. i.e, did anyone run the mail command on this file. did anyone cat this file. did anyone, cp this file anywhere. is this possible in unix?
Terrible
# 2  
Old 08-13-2006
From the man page on 'ls':

Code:
LS(1)                            User Commands                           LS(1)

NAME
       ls - list directory contents

SYNOPSIS
       ls [OPTION]... [FILE]...

DESCRIPTION
       List  information about the FILEs (the current directory by default).  Sort entries
       alphabetically if none of -cftuSUX nor --sort.

       Mandatory arguments to long options are mandatory for short options too.
...
       -u     with -lt: sort by, and show, access time with -l: show access time and  sort
              by name otherwise: sort by access time

Other than checking the last access time, no, there is no detailed information about how/what programs accessed a file. Get a man on 'stat' if you want to know what information about a file is stored.
# 3  
Old 08-13-2006
thanks a million
Terrible
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Notification Activity

Actually i am working on datastage and my operating system is Unix So I want a script in UNIX env for intimating the datastage log at the time of job abort. Can you please help me out .. Thanks in advance... (2 Replies)
Discussion started by: victory
2 Replies

2. AIX

System activity

Hi, I want to find program's file read,write for a particular time.For example i am executing an application called test1, this will get input from some parameter files(file1,file2,file3) and it will write to some files(file4,file5), so i want to execute one program which will capture these... (3 Replies)
Discussion started by: gnanadurai_it
3 Replies

3. UNIX for Dummies Questions & Answers

CPU Activity

One of my user always complains about the load on the server, he works in a different location & time zone. Is it possible to check the CPU activity during specific time/days? let us say for example, i want to check the load on the server at 9 pm to 10 PM on August 22th ? Not the current load.... (2 Replies)
Discussion started by: sydney2008
2 Replies

4. UNIX for Dummies Questions & Answers

Logging all console activity to a file - how?

Hi all, Well I've had a bit more experience with Unix-like environments since my last post, now that I have started working on my website in earnest and am doing much of the file manipulation via the command line through SSH. The thing is, I want to be able to log all console activity,... (4 Replies)
Discussion started by: patwa
4 Replies

5. Linux

Recording X or VNC Activity to a Video File?

I have the need to record some step by step instructions to help with instruction in using Fedora Core 3. I was wondering if there are any ways to capture X or VNC activity to a video file. It can be any of the most common formats (MPEG, DiVX/ViDX, Ogg Theora, etc...) Does anyone know of any apps... (3 Replies)
Discussion started by: deckard
3 Replies

6. UNIX for Dummies Questions & Answers

file activity (open/closed) file descriptor info using KORN shell scripting

I am trying to find a way to check the current status of a file. Such as some cron job processes are dependent on the completion of others. if a file is currently being accessed / modified or simply open state I will wait until it is done being processed before attempting the next process on that... (3 Replies)
Discussion started by: Gary Dunn
3 Replies
Login or Register to Ask a Question