getting last accessed and modified time together


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting getting last accessed and modified time together
# 1  
Old 09-22-2005
getting last accessed and modified time together

actually, i'm making an Intrusion Detection System for education purpose (for project) using Bourne shell. The problem I get in that is:-
1. My application should check if there's some modification or alteration in the directory.

2, For that thing, I need to have every attribute of file and folder (like permission, path, last access date, last modification time, etc).

3, I used the command ls -ls command but it only display one date and not the date either of modification or last accessed.

4, I need both date in a single file and that's the main problem i'm facing.

plz help me..
# 2  
Old 09-22-2005
The rules of the forum say 'Do not post classroom or homework problems'.

Read the man pages of stat. It will provide you with most of the information you are looking for.

The logic will be yours to implement.

vino
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to change modified time of a file

A files last modified time is like 03/02/2012 xx:xx:xx So what would be the command to convert the last modified in the given signature Thanks for giving time and replying..:) (2 Replies)
Discussion started by: ezee
2 Replies

2. Shell Programming and Scripting

Last Accessed Time Script

Hi I want a shell script that will give me a list of files which were last accessed over a specific time ago and want it to use a variable so I can do this... Rought Example... #Input time in bracket for how many months. MONTHSAGO="13" #Specify the Top Level Directory path you want to ... (6 Replies)
Discussion started by: digitaljunkie
6 Replies

3. Homework & Coursework Questions

Grep for modified time

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: is it possible to come up with a list of files that are modified before a certain number of hours only using the... (3 Replies)
Discussion started by: momo.reina
3 Replies

4. Shell Programming and Scripting

Grep for modified time

is it possible to come up with a list of files that are modified before a certain number of hours only using the grep command? ex. list files that were modified less than 10 hours ago i've only managed to list files that were created on the same day, i can't seem to figure out how to work... (3 Replies)
Discussion started by: momo.reina
3 Replies

5. Shell Programming and Scripting

Compare Last Modified Time across Time Zone

Hi, I'm new to shell script programming, I only have Java programming background. I'm writing a shell script to do file synchronization between 2 machines that located at different time zone area. Both machine were set its time zone according to its geographical location (Eg: server is at... (1 Reply)
Discussion started by: python
1 Replies

6. Shell Programming and Scripting

changing modified time

How to change the modified time of a file to any specified time. ls -ltr drwxr-xr-x 2 pipe pipe 4096 Jun 10 10:33 coredump_06062008 ---------------------------------------------------------------------- here file coredump_06062008 last modified time is Jun 10 10:33 and i... (1 Reply)
Discussion started by: ali560045
1 Replies

7. Shell Programming and Scripting

Getting modified time & filename only

Hi, When we use "ls -l" we are getting like below, -rw-r--r-- 1 mdskl mds 4161479 Apr 12 14:57 VTTF2008.20080412145748.cc But i need only modified time and filename only like below, Apr 12 14:57 VTTF3008.20080412145748.cc Thanks-:) Senthil (4 Replies)
Discussion started by: senthil_seera
4 Replies

8. HP-UX

Time Modified Issue Please Assist

I am trying to periodically check that the environment variables have not been changed on a HP-UX server. This was going to be easy except I ran into the odd circumstance of having two files that should be created equally be created differently when one is created by command line and the other is... (1 Reply)
Discussion started by: Emancipator
1 Replies

9. UNIX for Dummies Questions & Answers

Searching files by last accessed time

How can I search for files by last accessed time? I want to see files accessed in the last 24 hours, for example...or even less time, maybe in the last 3 hours? Thank you in advance, Trellot (4 Replies)
Discussion started by: Trellot
4 Replies

10. UNIX for Advanced & Expert Users

Modified time

How do you change the modified time of a file on UNIX?? (4 Replies)
Discussion started by: frank
4 Replies
Login or Register to Ask a Question