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. 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
6. 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
7. 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
8. Shell Programming and Scripting
Suppose I have a directory called jeet and inside that directory so many files will be there....
Example:
/abc/xyz/jeet
$ ls -ltr
total 0
-rw-r--r-- 1 oracle dba 0 Jan 13 11:36 naresh
-rw-r--r-- 1 oracle dba 0 Jan 13 11:36 sreeni
-rw-r--r-- 1 oracle dba ... (1 Reply)
Discussion started by: satyajit007
1 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