Search Results

Search: Posts Made By: brenoasrm
7,752
Posted By Don Cragun
The comparison is taking a trivial amount of time...
The comparison is taking a trivial amount of time compared to the time required to:

read your compressed data,
uncompress your data,
write your uncompressed data into a pipe, and
read your...
7,752
Posted By Don Cragun
Expanding on what Corona688 said, your two...
Expanding on what Corona688 said, your two commands:
zcat file1.gz | head -n 1
zcat file1.gz | tail -n 1
decompress the file twice (maybe not completing the first decompression), and if you find...
7,752
Posted By Corona688
Unfortunately you can't seek to the end of a...
Unfortunately you can't seek to the end of a compressed file without decompressing the entire thing, so it really doesn't save you time. Otherwise that'd be a really good idea.

How big is your...
7,752
Posted By RudiC
Corona688's reasoning is absolutely correct. I...
Corona688's reasoning is absolutely correct. I created a large file and timed several awk selection methods:




time awk '{if ($9 == "(200)" && $3 > "[13/Jul/2018:17:00:00" && $3 <...
7,752
Posted By Corona688
Assuming your input is sorted by date (which...
Assuming your input is sorted by date (which seems likely, given logfiles), processing files individually makes another really big optimization possible - once the date exceeds the cutoff, quit! You...
7,752
Posted By Corona688
How big are your files, how long do they take,...
How big are your files, how long do they take, and how fast is your disk? If you're hitting throughput limits optimizing your programs won't help one iota. If you're not, however, you can process...
7,752
Posted By Corona688
i.e. PROC=0 MAXPROC=4 mkdir...
i.e.


PROC=0
MAXPROC=4

mkdir /tmp/$$

let N=0

for FILE in nginx*
do
FNAME=$(printf "%04d" "$N") # Filenames like 0001 will sort properly in *
gunzip < "$FILE" | awk...
Showing results 1 to 7 of 7

 
All times are GMT -4. The time now is 06:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy