Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Help with list of latest file names Post 302442974 by shash on Friday 6th of August 2010 05:51:11 AM
Old 08-06-2010
Help with list of latest file names

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:
Code:
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 09:18
JOB002.LOG_00vi12_00001 - Aug  4 22:03
JOB002.LOG_00vi12_00002 - Aug  5 10:15
JOB003.LOG_00vm11_00001 - Aug 5 10:30

How to list only the below mentioned files:
Code:
JOB001.LOG_00vi0t_00003 - Aug  5 09:18
JOB002.LOG_00vi12_00002 - Aug  5 10:15
JOB003.LOG_00vm11_00001 - Aug 5 10:30

Please note that I don't have any permissions to write a shell script on this folder. Kindly help!

Thanks
Shash

Last edited by Yogesh Sawant; 08-27-2010 at 10:47 AM.. Reason: added code tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

ksh: How to get latest file from a list of files in a directory

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

2. UNIX for Dummies Questions & Answers

Get List of Unique File Names

I have a large directory of web pages. I am doing a search through the web pages using grep and would like to get a list of unique file names of search results. The following command works fine to give me a list of file names where term appears: grep -l term *.html However, since these are... (3 Replies)
Discussion started by: rjulich
3 Replies

3. Shell Programming and Scripting

List of file names

I have the following list of file names stored in $fnames, so that if I do foreach f ($fnames) echo "$f" end I will get n02-z30-sr65-rgdt0p50-dc0p002-16x12drw-run1 n02-z30-sr65-rgdt0p50-dc0p002-16x12drw-run2 n02-z30-sr65-rgdt0p50-dc0p002-16x12drw-run3... (3 Replies)
Discussion started by: kristinu
3 Replies

4. Shell Programming and Scripting

get file names from the list

Hi Experts, Here is my scenario: Am maintaining a file which has list of logs with complete path and file names like bleow a/b/c/Daily/file1_20111012.log d/e/f/Monthly/file1_20111001.log g/h/Daily/file1_20110120.log i/Daily/file1_20110220.log How to copy the file names frm the list... (7 Replies)
Discussion started by: laxm
7 Replies

5. Shell Programming and Scripting

How to get the dates from a list of file names?

Hi All, I have a .txt file with the list of filenames as given below. /dev_data/dev3/ctl/20120622_Employee.txt /dev_data/dev3/ctl/20120623_Employee.txt /dev_data/dev3/ctl/20120624_Employee.txt I want to read this file & write the dates alone from the filenames into a .done file. ... (6 Replies)
Discussion started by: dsfreddie
6 Replies

6. Shell Programming and Scripting

List the file names that differ

Hello, I have two directories - prev and current . They both have same multiple subdirectories and files. Now the current directory can have some updated files and some new files added that is not in prev. I want to find the list of file names that differ. I am doing this because i can not... (2 Replies)
Discussion started by: jakSun8
2 Replies

7. Shell Programming and Scripting

Shell script to get the latest file from the file list and move

Hi, Anybody help me to write a Shell Script Get the latest file from the file list based on created and then move to the target directory. Tried with the following script: got error. A=$(ls -1dt $(find "cveit/local_ftp/reflash-parts" -type f -daystart -mtime -$dateoffset) | head... (2 Replies)
Discussion started by: saravan_an
2 Replies

8. UNIX for Dummies Questions & Answers

List Directory names which have the file

Hi All, Can any one help me to list out the directory names which contain the specified file. See for example File name : file.201307014.LKT Have the directory structure as below. /app/work/data/INDIA/file.201307014.LKT /app/work/data/AMERICA/file.201307014.KTP... (5 Replies)
Discussion started by: Balasankar
5 Replies

9. Shell Programming and Scripting

I have this list of files . Now I will have to pick the latest file based on some condition

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

10. UNIX for Beginners Questions & Answers

Need help with UNIX command to get the latest file from list of files with timestamp

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
VMWARE-XFERLOGS(1)						   Open VM Tools						VMWARE-XFERLOGS(1)

NAME
vmware-xferlogs - dump vm-support output to vmx logfile SYNOPSIS
vmware-xferlogs OPTIONS FILE DESCRIPTION
vmware-xferlogs is a simple console application and can be run as any user. It is based on rpctool to dump the vm-support output to the vmx log file base64 encoded. It can dump any file supplied on the commandline to the vmx log. It also does the decoding part of it. It can read the vmware.log file decode and write the encoded files in the directory it was invoked. Example of a transfer found in the vmx log file: Aug 24 18:48:09: vcpu-0| Guest: >Logfile Begins : /root/install.log: ver - 1 Aug 24 18:48:09: vcpu-0| Guest: >SW5zdGFs- bGluZyA0NDEgcGFja2FnZXMKCkluc3RhbGxpbmcgZ2xpYmMtY29tbW9uLTIuMi41LTM0 Aug 24 18:48:09: vcpu-0| Guest: >LgpJbnN0YWx- saW5nIGh3ZGF0YS0wLjE0LTEuCkluc3RhbGxpbmcgaW5kZXhodG1sLTcuMy0zLgpJ Aug 24 18:48:09: vcpu-0| Guest: >bnN0YWxsaW5nIG1haWxjYXAtMi4xLjk- tMi4KSW5zdGFsbGluZyBtYW4tcGFnZXMtMS40OC0yLgpJ .... .... Aug 24 18:48:10: vcpu-0| Guest: >Mi4K Aug 24 18:48:10: vcpu-0| Guest: >Logfile Ends OPTIONS
enc dec SEE ALSO
vmware-checkvm(1) vmware-hgfsclient(1) vmware-toolbox(1) vmware-toolbox-cmd(1) vmware-user(1) libguestlib(3) libvmtools(3) vmware-guestd(8) vmware-hgfsmounter(8) vmware-user-suid-wrapper(8) vmblock(9) vmci(9) vmhgfs(9) vmmemctl(9) vmsock(9) vmsync(9) vmxnet(9) vmxnet3(9) HOMEPAGE
More information about vmware-xferlogs and the Open VM Tools can be found at <http://open-vm-tools.sourceforge.net/>. AUTHOR
Open VM Tools were written by VMware, Inc. <http://www.vmware.com/>. This manual page was put together from homepage materials by Daniel Baumann <daniel.baumann@progress-technologies.net>, for the Debian project (but may be used by others). 2010.03.20-243334 2010-04-08 VMWARE-XFERLOGS(1)
All times are GMT -4. The time now is 04:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy