Sponsored Content
Top Forums Shell Programming and Scripting Script to copy creation date over top of modified date? Post 302970981 by jgt on Thursday 14th of April 2016 09:48:39 AM
Old 04-14-2016
'istat' is part of the sleuthkit.
There is a command 'stat' that will display
Code:
veritron jack # cd /etc
veritron etc # stat hosts
  File: ‘hosts'
  Size: 242           Blocks: 8          IO Block: 4096   regular file
Device: 801h/2049d    Inode: 9568430     Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2016-04-13 10:46:00.045167230 -0400
Modify: 2015-08-08 11:25:10.182809658 -0400
Change: 2015-08-08 11:25:10.222809658 -0400
 Birth: -
veritron etc #

However, the Birth date, which I assume is the original creation date, does not seem to be maintained on my system (Linux Mint 17)
The output can be formatted.
Code:
veritron etc # stat -c "%x" hosts
2016-04-13 10:46:00.045167230 -0400

 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Changing Creation Date to a Prespecified Date of a File In Unix

Dear Expert, Is there a command to do that in Unix? In such a way that we don't need to actually "write" or modified the content. -- monkfan (4 Replies)
Discussion started by: monkfan
4 Replies

2. UNIX for Dummies Questions & Answers

script to rename files with current date and copy it.

I have few webservers logs like access.log. which would be growing everyday. what i do everyday is, take the backup of access.log as access.log_(currentdate) and nullify the access.log. So thought of writing a script... but stuck up in middle. My requirement: to take the backup and nullify... (6 Replies)
Discussion started by: logic0
6 Replies

3. Shell Programming and Scripting

Script to copy log files with today's date

I am a newbie to scripting. I need a korn shell script to copy log files of current day to archive folder and rename with current days date stamp. I would really appreciate your help. File structure is as follows. Everyday files get overwritten, so I need copy to a archive directory and... (3 Replies)
Discussion started by: mdncan
3 Replies

4. Shell Programming and Scripting

mp3 tag/rename based on creation (last modified date)

Arg, I'm trying to figure out how to create a album tag based on the last modified date stamp for files which don't have a corresponding .talk file. IE. 2009 12 10 - Talk Radio.mp3 is how I want them structured, they should all have a corresponding .talk file so my mp3 player can speak the name ie... (0 Replies)
Discussion started by: mrplow
0 Replies

5. Shell Programming and Scripting

Help with script to copy/rename files, then delete by date

Hi All, I am new to scripting and am looking for some assistance setting up a script. Basically I need the script to scan a folder for the newest files and make a copy of those files, adding a month to the date stamp. I also need this script to delete the previously copied files to save space.... (4 Replies)
Discussion started by: Lucid13
4 Replies

6. UNIX for Dummies Questions & Answers

Script to copy files from a certain date

I need to copy files from a directory that has a lot of files in it. However I only want to copy them from a certain date. My thoughts so far are to use ls -l and to pipe this into awk and print out tokens 6 (month)and 7 (day). $ ls -l -rw-r--r-- 1 prodqual tst 681883 Jun 12... (2 Replies)
Discussion started by: millsy5
2 Replies

7. UNIX for Dummies Questions & Answers

Copy log based on from-date and to-date

Hi all, i go a customer support requirement where i need to scan several files based on from/to date like 1-oct to 2-oct please help... (3 Replies)
Discussion started by: AbhiJ
3 Replies

8. UNIX for Beginners Questions & Answers

Copy files in order of creation date

Hi everyone :-) I ran into a small issue. I would like to copy some files in the precise order they were created. So the oldest files should be copied first and the newest ones last. I tried cp -r $(ls -1t) ./destination but the files are still not sorted properly. I was thinking, that... (11 Replies)
Discussion started by: officiallyme
11 Replies

9. Shell Programming and Scripting

Script to print file name and its creation date

Hello , I am looking for a script to print file name and its last updated time. FILE CREATION-TIME FILE-NAME 24/10/2017 12:34 TDR-IU-8-2017.10.24.07:40:00-2017.10.24.07:45:00 when we run l command it print the directory and the files with details like permission,... (1 Reply)
Discussion started by: sadique.manzar
1 Replies
RFSTAT(1)							Rfio User Commands							 RFSTAT(1)

NAME
rfstat - get information about a file or directory SYNOPSIS
rfstat directory rfstat filename DESCRIPTION
The rfstat program provides an interface to the shift remote file I/O daemon (rfiod) for getting information about a remote directory or file. The filename or directory argument is either a remote file name of the form: hostname:path or a local file name (not containing the :/ character combination). The output from the rfstat command gives information similar to that of the ls -il command for listing local files or directories, one field per line. EXAMPLE
rfstat /tmp Device : 802 Inode number : 2 Nb blocks : 16 Protection : drwxrwxrwt (41777) Hard Links : 13 Uid : 0 (root) Gid : 0 (root) Size (bytes) : 4096 Last access : Wed Jun 15 07:18:10 2011 Last modify : Wed Jun 15 07:18:10 2011 Last stat. mod. : Wed Jun 15 07:18:10 2011 SEE ALSO
rfio_stat(3), rfiod(1) NOTES
rfstat does not support regular expressions (regexp(5)) in the directory or filename argument. AUTHOR
LCG Grid Deployment Team LCG
$Date$ RFSTAT(1)
All times are GMT -4. The time now is 02:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy