This makes no sense. The timestamp on a directory will change when the contents of the directory changes (such as when a file is created inside that directory or when a file is removed from the directory); not when the contents of a file in the directory changes.
Assuming that you have determined the name of the file that you want, saved that file's name in a variable named filename, and that that file name only appears in one directory, you could try something like:
There is a file called check.log in each of the three folders.
Using the timestamp of each of the three folders we can determine & fire a grep command only on that folder's check.log [archive_52/check.log]. because the time stamp of folders archive_51, archive_53 are pre and post the time of the M1120252_P004640.csv file i.e. Jan 20 17:11
So please help me cd to the folder [ archive_52 ] automatically based on the timestamp of the given .csv file.
Hi,
I am writing a script where i need to list all the files that have a scecific timestamp. I get this time stamp from another file. Is it possible to do this with 'find' command?
Please let me know your valuable inputs.
Thanks
Sunny. (1 Reply)
hello everybody,
im new here... can u tell me how can i add a timestamp in a bottom of a file which will say for example..it was written on that date and time.
is tha possible??
thanxxxxxx (7 Replies)
Dear friends..
I have the below listing of files under a directory in unix
-rw-r--r-- 1 abc abc 263349631 Jun 1 11:18 CDLD_20110603032055.xml
-rw-r--r-- 1 abc abc 267918241 Jun 1 11:21 CDLD_20110603032104.xml
-rw-r--r-- 1 abc abc 257672513 Jun 3 10:41... (5 Replies)
Hi All,
I have a large text file which is a combination of multiple files. This is what I used and it worked.
for i in /home/docs/text/*
do
cat $i >> Single_File
done
Now wondering, if there is a way to sort that single large file based on timestamps in ascending order. Text file... (11 Replies)
I've the files in a directory in the following format having date +%Y%m%d%H
YR_MNTH_2013061205
YR_MNTH_2013060107
and i need the latest file i.e; YR_MNTH_2013061205 to be moved to another folder
#!/bin/ksh
# Ksh 88 Version
for test_time in YR*
do
---
done
How can i achieve that !... (2 Replies)
Hi All,
I have a cron job that has worked wonders:
zip /home/myHostedFolder/public_html/images/_backups/front/$(date +\%Y\%m\%d).zip /home/myHostedFolder/public_html/images/front/* && rm /home/myHostedFolder/public_html/images/front/*
But now work, needs me to modify it. Should be easy but... (5 Replies)
Hi i need to keep todays files based on timestamp and archive the remaining files
ex:
Managerial_Country_PRD_20150907.csv
Managerial_Country_PRD_20150906.csv
Managerial_Country_PRD_20150905.csv (2 Replies)
Hi,
I want take the files whose timestamp greater than "2015-12-23 22:30" using awk .Please advise
os version :Linux ip-172-31-19-240 4.1.10-17.31.amzn1.x86_64 #1 SMP Sat Oct 24 01:31:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
2015-12-23 20:43:17 312116 file1
2015-12-23 21:44:46 314375... (11 Replies)
Hi,
I have a script doing backup to synology server, the script create new folder each day with the date as being folder name i.e. 2018-07-30. Just before creating the new folder I want the script to find the oldest folder from the list and delete it including its content.
for example... (3 Replies)