10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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)
Discussion started by: humble_learner
3 Replies
2. Shell Programming and Scripting
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)
Discussion started by: mohan705
11 Replies
3. UNIX for Dummies Questions & Answers
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)
Discussion started by: ram1228
2 Replies
4. UNIX for Dummies Questions & Answers
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)
Discussion started by: MrDude
5 Replies
5. UNIX for Dummies Questions & Answers
Below is the sample logfile:
Userids Date Time
acb Checkout time: 2013-11-20 17:00
axy Checkout time: 2013-11-22 12:00
der Checkout time: 2013-11-17 17:00
xyz Checkout time: 2013-11-19 16:00
ddd Checkout time: 2013-11-21 16:00
aaa Checkout... (9 Replies)
Discussion started by: asjaiswal
9 Replies
6. Shell Programming and Scripting
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)
Discussion started by: smile689
2 Replies
7. UNIX for Dummies Questions & Answers
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)
Discussion started by: prrampalli
11 Replies
8. Shell Programming and Scripting
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)
Discussion started by: sureshg_sampat
5 Replies
9. UNIX for Dummies Questions & Answers
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)
Discussion started by: psychobeauty
7 Replies
10. UNIX for Dummies Questions & Answers
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)
Discussion started by: sunny_03
1 Replies