Quantcast
Channel: CentOS » Sean Carolan
Browsing latest articles
Browse All 4 View Live

Optimizing Grep, Sort, Uniq For Speed

This snippet of code pulls an array of hostnames from some log files. It has to parse around 3GB of log files, so I’m keen on making it as efficient as possible. Can you think of any way to optimize...

View Article



Gradually Adjust NTP Sync Over Time?

Suppose you have server A and server B. Server B is running 60 seconds too fast, while server A is accurate. Is there a way to gradually move server B’s time back into sync with server A, without...

View Article

Rsync – Include Only Files Containing Matching String

I have a string, “2012_10_16″; let’s call this $YESTERDAYHow can I rsync a file tree from a remote machine to the local one, including *only* filenames that contain the matching string? I’ve read the...

View Article

Find With -mtime And -print0 = Inaccurate Results

If I run this:find /path/to/files/ -type f -mtime -2 -name *.xml.gzI get the expected results, files with modify time less than two days old.But, if I run it like this, with the print0 flag:find...

View Article
Browsing latest articles
Browse All 4 View Live




Latest Images