Any way to get find command o/p in chronological order?
Hi friends,
I am using below script to gzip files after naming them in a particular order.
but I intend to name them in numerical order as per their timings(earlier updated fle with a smaller numeric extension than later updated),but this script is not working as planned.
please help with this.
What does it do? Please give examples, including example before and after filenames.
You might find that using the current date and time as a suffix is easier to code.
suppose i have below files in a directory
till
all files are gzipped ,i intend to gzip other files which are not of todays date following sequence of last file(log.245,log.246,log.247) as mentioned in above code ,i.e from next file onwards last three files
should be gzipped with following names
but they should ne gzipped in chronological order i.e
greaseRetry.log.1 as greaseRetry.log.245.gz
greaseRetry.log.2 as greaseRetry.log.246.gz
greaseRetry.log as greaseRetry.log.247.gz
but when i am running this script files are not gzipped in sequence as per there update timings,i need to rename them in sequence as per there last update time
Infortunately the suffix on the unzipped files does not seem to relate to the timestamp or we could have used that to increment the new suffix.
Armed with the knowledge that there are small number of files per run, the following construct should work in order to process the files in chronological order within the loop. Note that this is ls-hyphen-one (not ls-hyphen-ell). All we are doing extra is placing the output of find onto a ls line so we can sort by timestamp. This technique does not work if any filenames contain space characters.
I am trying to sort a log file in chronological order to identify which ones did not process and still have an old (probably yesterday's) date. This is a sample of the file:flatf 010140 flatf Thu May 10 22:22:11 CST 2018 flats finished
flatf 010142 flatf Thu May 10 22:31:25 CST 2018 flats... (4 Replies)
I have Apache v2.0.63 on Solaris 10 (x86 on VM). While starting the apache server, facing the following exception -
Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration
Googling says to add the entry LoadModule authz_host_module... (0 Replies)
Hi All,
Here is my question.
I have two files, file1.txt and file2.txt. I need the line number (index number) of file2.txt where the words in file1.txt appear. But they have to be in the same order as file1.txt. In example,
file1.txt
Z
K
A
...
T
file2.txt
W
A
Q
R (6 Replies)
Hi forum.
I'm hoping someone can help me out with this problem. I tried to search online but couldn't come up with an exact solution.
I have the following data file:
H|20-May-2011|MF_FF.dat|77164|731374590.96|1|1|731374590.96|76586|77164|578|2988|Y... (8 Replies)
Hi!
Could you please explain why the result order isn't in reverse time order as it is requestet by "xargs ls -ltr" command (ksh shell)? There are about 5000 files in dir.
$ find . -name "*201010*" -print |xargs ls -ltr |tail
-rw-r--r-- 1 oracle oinstall 54326 Nov 25 20:32... (2 Replies)
HI everyone,
I am trying to use the unix sort command to get a list of numbers sorted in ascending order but having trouble in getting it to work.
An example of this issue would be when i am trying to sort the following three
number each on a different line "1" , "2" and "116" the sort command... (3 Replies)
Hi Xperts,
I've one query for you. Please help me solving this.
Below command is taking long time to fetch names of the files which contain string "475193976" because folder contains millions of files. I agree that this is what this function suppose to do. Correct.. But can it be possible... (6 Replies)