File modification history


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting File modification history
# 1  
Old 12-05-2008
File modification history

Can anyone please suggest an alternate command for "stat" . I am trying this on Solaris 5.9 , but the command doesn't exist.

Basically i need to see one particalar file modification history. Any help is appreciated.
# 2  
Old 12-05-2008
mtime (Modify Time) you can see by a simple "ls -l". For atime (Access Time) and ctime (Change Time) check the options/switches for "ls". man ls.
# 3  
Old 12-05-2008
Hi Zaxxon,

I have tried the commands you have listed . The output i am looking at is something mentioned on this link .

https://www.unix.com/unix-dummies-que...file-unix.html

But stat command doesnt work on solaris.
# 4  
Old 12-05-2008
Code:
perl -e'
  printf "access:\t%s\nmodify:\t%s\nchange:\t%s\n",
    map scalar localtime $_,(stat shift)[8..10]
    ' filename

# 5  
Old 12-05-2008
Thanks a lot, this command worked.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

History to Another file [local user history , but root access]

Hi all, My need is : 1. To know who , when , which command used. 2. Local user should not delete this information. I mean , with an example , i can say i have a user user1 i need to give all the following permissions to user1, : a. A specific directory other than his home... (1 Reply)
Discussion started by: sriky86
1 Replies

2. Shell Programming and Scripting

File Modification

Hi, I have a file input.txt. cat input.txt output is as follows : Code: "0001"~"name"~"bb"~"20.25"~""~""~"0002"~"name" "dd"~"35.50"~"" ~""~"0003"~"name"~"aa"~"21.3 5"~""~""~ I want the output looking like: cat output.txt Code: "0001"~"name"~"bb"~"20.25"~""~""~... (6 Replies)
Discussion started by: mnmonu
6 Replies

3. Shell Programming and Scripting

Help for File Modification

Hi All, I have a file. This file contain huge amount of data. I want to modify this file. I want enter new line when count of "~ character is 79. Please find below the code : cat file_name | tr -d '\n' | sed... (6 Replies)
Discussion started by: mnmonu
6 Replies

4. Shell Programming and Scripting

Help with file modification

Hi, I have a file test.txt . The contain of the file is as below : 365798~SAPUS~PR5~0000799005~ADM CHARG MEDCAL INS~~~~~~~~~~~~~~~~~~~~~~~~SLAC480 I want to modify this file. And file contain loking like "365798"~"SAPUS"~"PR5"~"0000799005"~"ADM CHARG MEDCAL... (6 Replies)
Discussion started by: mnmonu
6 Replies

5. UNIX for Advanced & Expert Users

History to Another file [local user history , but root access]

Hi all, My need is : 1. To know who , when , which command used. 2. Local user should not delete this information. I mean , with an example , i can say i have a user user1 i need to give all the following permissions to user1, : a. A specific directory other than his home... (3 Replies)
Discussion started by: linuxadmin
3 Replies

6. Solaris

Command for checking modification history on file

What is the command for checking modification history on file? ---------- Post updated at 01:20 PM ---------- Previous update was at 12:35 PM ---------- Let me rephrase this. On a regular Unix file can I at least check to see the time and date history modification of the file? (6 Replies)
Discussion started by: jastanle84
6 Replies

7. UNIX for Dummies Questions & Answers

How to change the file modification time of a file on nfs mount point

Hi I am accessing a file on nfs mounted device, after completing using of the file, i am tring to restore the access time and modification times of the file. So i got the previous modified time of the file using stat() function and trying to set the date and time for the file, To set these... (6 Replies)
Discussion started by: deepthi.s
6 Replies

8. UNIX for Dummies Questions & Answers

How to track the modification history on file in unix

How do we track the modification history on a file in UNIX. IS there any command or any script that we could run. Many Thanks (5 Replies)
Discussion started by: RSPDaemon
5 Replies

9. Solaris

Modification history for Crontab

Hi all - I've searched the forums and seen a few questions related, but nothing which explicitly answers what I'm looking for. I need to know if there's ANY way to get the modification history of any users crontab. Yes, I know that crontabs are in /var/spool/cron. I know that the... (2 Replies)
Discussion started by: amcq
2 Replies

10. Shell Programming and Scripting

File modification

Dear all, i have a file which contains this lines. 0-0 CC=1 0-01 0-011 0-0111 0-01110 F=500 CC=1 L=15 M=5 TRD=3948... (2 Replies)
Discussion started by: panknil
2 Replies
Login or Register to Ask a Question