10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi All,
I have list of files like below with name abcxyz.timestamp. I need a unix command to pick the latest file from the list of below files. Here in this case the lates file is abcxyz.20190304103200. I have used this unix command "ls abcxyz*|tail -1" but i heard that it is not the appropriate... (2 Replies)
Discussion started by: rakeshp
2 Replies
2. Shell Programming and Scripting
find /tmp/testlog/kSR*"_"2018* -type f -printf '%T@ %p\n' | sort -n | tail -3 | cut -f2- -d" "
/tmp/testlog/log/KSR04_2018-07-05.log
/tmp/testlog/log/KSR04_2018-07-06.log
/tmp/testlog/log/KSR01_2018-07-06.log
But, I would see the following output(latest files for each KSR tuype)
... (3 Replies)
Discussion started by: jhonnyrip
3 Replies
3. Shell Programming and Scripting
3679 Jul 21 23:59 belk_rpo_error_**po9324892**_07212014.log
0 Jul 22 23:59 belk_rpo_error_**po9324892**_07222014.log
3679 Jul 23 23:59 belk_rpo_error_**po9324892**_07232014.log
22 Jul 22 06:30 belk_rpo_error_**po9324267**_07012014.log
0 Jul 20 05:50... (5 Replies)
Discussion started by: LoneRanger
5 Replies
4. Shell Programming and Scripting
hi,
i have some file in a directory say
p1.txt.201305051200.lst
p1.txt.201305051300.lst
p1.txt.201306051200.lst
p1.txt.201306051300.lst
p2.txt.201306051200.lst
p2.txt.201306051300.lst
i am using p* pattern to retrieve these file
ls -1 p*
the files in red color are the latest... (7 Replies)
Discussion started by: Little
7 Replies
5. UNIX for Dummies Questions & Answers
Hello all!! I am new here and new in scripting!
I want to write a ksh script to select the most recent file from a dir and use it in a variable.
I have a directory with files named like: YYYMMDD
A basic idea of the script I want to write is
#!/usr/bin/ksh
latest= latest_dated_file at... (2 Replies)
Discussion started by: chris_euop
2 Replies
6. Shell Programming and Scripting
I'd like to grep files for key words using korn shell, and compile the actual contents (not just file name) of those files that contain a combination of those grepped key words into one repository file for reference. However, I'm stuck at the combining part. Here's what I have thus far:
egrep... (5 Replies)
Discussion started by: drumminfool91
5 Replies
7. Shell Programming and Scripting
I want to get the latest files from multiple directories, d1, d2,d3 and d4 under the parent dierectoy d.
can anyone help out with this?
thx (3 Replies)
Discussion started by: shyork2001
3 Replies
8. Shell Programming and Scripting
I Need help for one requirement,
I want to move the latest/Older file in the folder to another file. File have the datetimestamp in postfix.
Example:
Source Directory : \a
destination Directory : \a\b
File1 : xy_MMDDYYYYHHMM.txt (xy_032120101456.txt)
File2: xy_MMDDYYYYHHMM.txt... (1 Reply)
Discussion started by: pp_ayyanar
1 Replies
9. Shell Programming and Scripting
Hello
I have three directory structures for code releases.
Each directory structure looks like this:
bash-3.00$ ls -R | more
.:
Test_Release_1
Test_Release_2
Test_Release_3
./Test_Release_1/dbcode:
rp_online_import_srdp.pkb-1
srdp_ar_validation.pkb-1... (1 Reply)
Discussion started by: Glyn_Mo
1 Replies
10. UNIX for Dummies Questions & Answers
Hi,
There are huge no of files in the directory. If i say ls -ltr it is taking too much time. i want to see only the files for Feb,2009. Please help.
Thanks (3 Replies)
Discussion started by: venkatesht
3 Replies