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
Hi,
Actually i got a client requirment and i need experts help here.
we have 30 parent directories and in that we have so many subdirectories and files. i want to find only latest timestamp files with out touching subdirectories
and need to redirect the latest files into some other... (3 Replies)
Discussion started by: lkeswar
3 Replies
4. 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
5. Red Hat
Guys,
Someone please guide me to tell me how do I print and later remove all old files in a folder recursively but keep only latest 15 modified files.
When I do - ls -tp | head -15
I get the list of last 15 modified files whereas I need the list of all OTHER files except these files.
... (3 Replies)
Discussion started by: rockf1bull
3 Replies
6. UNIX for Advanced & Expert Users
Hai
I wolud like to know how to get the latest files.
ex:
file_ssss_00
file_ssss_01
i need to get file_ssss_01 files only. (in Unix script)
Please give some idea ... (2 Replies)
Discussion started by: raju4u
2 Replies
7. UNIX for Dummies Questions & Answers
Hi Gurus,
I need to list only those files which are most recent and the latest log file.
For example if I have the following file list:
JOB001.LOG_00uv02_00006 - Jul 7 12:16
JOB001.LOG_00vi0t_00001 - Aug 4 21:58
JOB001.LOG_00vi0t_00002 - Aug 5 09:15
JOB001.LOG_00vi0t_00003 - Aug 5... (6 Replies)
Discussion started by: shash
6 Replies
8. Shell Programming and Scripting
Hi,
In my scenario, i just want to delete all the files except the latest one.
How can I do?
Please reply me. (3 Replies)
Discussion started by: spkandy
3 Replies
9. Shell Programming and Scripting
Guys,
Please can you tell me how to retain 3 latest files in a directory and get rid of the rest ?
Thanks very much
Regards,
Ganesh (6 Replies)
Discussion started by: kamathg
6 Replies
10. Shell Programming and Scripting
Hi,
I need to get the latest file from a list of files in a particular directory.
Please could anyone help me out to get the file.
Thank you,
- Jay. (1 Reply)
Discussion started by: Jayathirtha
1 Replies