Sponsored Content
Full Discussion: How to sort these files?
Top Forums UNIX for Beginners Questions & Answers How to sort these files? Post 303021372 by jeisma on Wednesday 8th of August 2018 01:27:41 PM
Old 08-08-2018
How to sort these files?

Hi,

An ls outputs this

Code:
-rw-rw-rw-   1 jeisma     users            0 Aug  8 09:24 file.d1
-rw-rw-rw-   1 jeisma     users            0 Aug  8 09:24 file.d10
-rw-rw-rw-   1 jeisma     users            0 Aug  8 09:24 file.d11
-rw-rw-rw-   1 jeisma     users            0 Aug  8 09:25 file.d2
-rw-rw-rw-   1 jeisma     users            0 Aug  8 09:25 file.d3
-rw-rw-rw-   1 jeisma     users            0 Aug  8 09:25 file.d4
-rw-rw-rw-   1 jeisma     users            0 Aug  8 09:41 file_2.d1
-rw-rw-rw-   1 jeisma     users            0 Aug  8 09:41 file_2.d10
-rw-rw-rw-   1 jeisma     users            0 Aug  8 09:42 file_2.d11
-rw-rw-rw-   1 jeisma     users            0 Aug  8 09:42 file_2.d2
-rw-rw-rw-   1 jeisma     users            0 Aug  8 09:42 file_2.d4
-rw-rw-rw-   1 jeisma     users            0 Aug  8 09:42 file_3.d1

Tried several combos with the sort command but can't get the output to be like this

Code:
-rw-rw-rw-   1 jeisma     users            0 Aug  8 09:24 file.d1
-rw-rw-rw-   1 jeisma     users            0 Aug  8 09:25 file.d2
-rw-rw-rw-   1 jeisma     users            0 Aug  8 09:25 file.d3
-rw-rw-rw-   1 jeisma     users            0 Aug  8 09:25 file.d4
-rw-rw-rw-   1 jeisma     users            0 Aug  8 09:24 file.d10
-rw-rw-rw-   1 jeisma     users            0 Aug  8 09:24 file.d11
-rw-rw-rw-   1 jeisma     users            0 Aug  8 09:41 file_2.d1
-rw-rw-rw-   1 jeisma     users            0 Aug  8 09:42 file_2.d2
-rw-rw-rw-   1 jeisma     users            0 Aug  8 09:42 file_2.d4
-rw-rw-rw-   1 jeisma     users            0 Aug  8 09:41 file_2.d10
-rw-rw-rw-   1 jeisma     users            0 Aug  8 09:42 file_2.d11
-rw-rw-rw-   1 jeisma     users            0 Aug  8 09:42 file_3.d1

Any ideas how?

TIA!
 

10 More Discussions You Might Find Interesting

1. Linux

sort files by date

Hi All, Sorry to throw this frequent question but I lost my notes on it. How do you list the files by date? I'm on red hat. Thanks in advance, itik (1 Reply)
Discussion started by: itik
1 Replies

2. UNIX for Dummies Questions & Answers

sort files

Hi Can some one help me with sorting a file where i am supposed to sort based on the last column(i.e 3rd column) and then by 1 st column Sample data 2 ishika 4 5 suj 3 10 raj 4 23 fff 3 45 amar 4 to be sorted to 5 suj 3 23 fff 3 2 ishika 4 10 raj 4 45 amar 4 I tried to sort... (2 Replies)
Discussion started by: mita10
2 Replies

3. UNIX for Dummies Questions & Answers

Sort files by date, not showing files from today

Hi all, i'm new here in this forum. I really like the helpful answers in this forum. Here a short question. For a script i have to sort files by date and exclude the files of the actual date. Sorting the files by date and preparing the output for awk is done by this line: ls -l... (3 Replies)
Discussion started by: carlosdivega
3 Replies

4. Shell Programming and Scripting

sort files

i have a folder contails 3 types of files , ls -l -rw-r--r-- 1 oratest dba 7 Jul 1 15:36 aml001.agl -rw-r--r-- 1 oratest dba 7 Jul 1 15:36 aml002.agl -rw-r--r-- 1 oratest dba 6 Jul 1 15:43 aml003.agl -rw-r--r-- 1 oratest dba 7 Jul 1 15:36 bom001.agl -rw-r--r-- 1 oratest dba 7... (4 Replies)
Discussion started by: Elii
4 Replies

5. UNIX for Dummies Questions & Answers

Merge files and sort them

hi all, i have three files naming file1 , file2, file3 . i want to merge the content of these three files, sort them and display the sorted output on the screen page by page. (1 Reply)
Discussion started by: sonu_pal
1 Replies

6. UNIX for Advanced & Expert Users

Script to sort the files and append the extension .sort to the sorted version of the file

Hello all - I am to this forum and fairly new in learning unix and finding some difficulty in preparing a small shell script. I am trying to make script to sort all the files given by user as input (either the exact full name of the file or say the files matching the criteria like all files... (3 Replies)
Discussion started by: pankaj80
3 Replies

7. Shell Programming and Scripting

Sort and output to different files

Hi all! I have a comma delimited file and I'm sorting it based on fields 6, 8 and 10. The following does the job: sort -t, -nk6,10 unsorted.txt -o sorted.txt What I need to do now is to write every row containing same values on fields 6, 8 and 10 to a different file. Any ideas on how to do... (2 Replies)
Discussion started by: Tr0cken
2 Replies

8. Shell Programming and Scripting

sort the files based on timestamp and execute sorted files in order

Hi I have a requirement like below I need to sort the files based on the timestamp in the file name and run them in sorted order and then archive all the files which are one day old to temp directory My files looks like this PGABOLTXML1D_201108121235.xml... (1 Reply)
Discussion started by: saidutta123
1 Replies

9. Shell Programming and Scripting

How to sort the files according to the number?

Hi Everyone, I have a question: I have a lot of file named like or10000.dat, or9100.dat, or100.dat, or3100.dat... I want to deal with these files according to the number in the name. So I want to deal with or100.dat first and then or3100.dat and so on. I used : for i in `ls or*.dat |... (11 Replies)
Discussion started by: wxuyec
11 Replies

10. UNIX for Beginners Questions & Answers

Sort files to the split second

I need a similar sort, I need to sort the directory by time, but time needs to be to the second or smaller. Using ls -lt but that is only to the minute. (3 Replies)
Discussion started by: mwlaursen
3 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 10:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy