Supermind Search Consulting Blog 
Solr - ElasticSearch - Big Data

Split wav/flac/ape files with cue

Posted by Kelvin on 07 May 2012 | Tagged as: Ubuntu

This entry is part 19 of 19 in the Bash-whacking series If you ever need to split a disc image which has been burned as a single wav/flac/ape file with a corresponding cue file, this will help you out. Split2flac does all the tedium of splitting, renaming (according to a renaming pattern of your choosing), […]

Batch convert svg to png in Ubuntu

Posted by Kelvin on 19 Oct 2011 | Tagged as: Ubuntu

This entry is part 18 of 19 in the Bash-whacking series span class="st0">'s/svg$/png/"s/svg$/png/'

Mount a .dmg file in Ubuntu

Posted by Kelvin on 11 Oct 2011 | Tagged as: Ubuntu

This entry is part 17 of 19 in the Bash-whacking series   The .dmg archive is now mounted at /mnt. You can browse it either via command-line or via Nautilus. Courtesy of http://iremedy.net/blog/2010/11/how-to-mount-a-dmg-file-in-ubuntu-linux/

Delete directories older than x days

Posted by Kelvin on 04 Aug 2011 | Tagged as: Ubuntu

This entry is part 16 of 19 in the Bash-whacking series Great for cleaning up log directories.   Change 14 to the required age in days.

Determine if a server supports Gzip compression

Posted by Kelvin on 06 Jun 2011 | Tagged as: Ubuntu

This entry is part 15 of 19 in the Bash-whacking series span class="st0">"Size WITHOUT accepting gzip""size_download=%{size_download}\n""Size WITH accepting gzip""Accept-Encoding: gzip,deflate""size_download=%{size_download}\n" –output /dev/null   You can of course substitute the URL with a different one. On my site, this is what I get: span class="st0">"size_download=%{size_download}\n""Accept-Encoding: gzip,deflate""size_download=%{size_download}\n"

Using sed to delete lines from a file

Posted by Kelvin on 21 May 2011 | Tagged as: Ubuntu

This entry is part 14 of 19 in the Bash-whacking series Delete line containing foo span class="st0">'/foo/d"$d'

Recursively find the n latest modified files in a directory

Posted by Kelvin on 18 May 2011 | Tagged as: programming, Ubuntu

This entry is part 13 of 19 in the Bash-whacking series Here's how to find the latest modified files in a directory. Particularly useful when you've made some changes and can't remember what! span class="st0">'%T@ %p\n'" "   Replace tail -1 with tail -20 to list the 20 most recent files for example. Courtesy of […]

Convert fixed-width file to CSV

Posted by Kelvin on 12 May 2011 | Tagged as: programming, Ubuntu

This entry is part 12 of 19 in the Bash-whacking series After trying various sed/awk recipes to convert from fixed-width to CSV, I found a Python script that works well. Here it is, from http://code.activestate.com/recipes/452503-convert-db-fixed-width-output-to-csv-format/ ## {{{ http://code.activestate.com/recipes/452503/ (r1) # Ian Maurer # http://itmaurer.com/ # Convert a Fixed Width file to a CSV with Headers […]

MD5 a directory recursively

Posted by Kelvin on 05 May 2011 | Tagged as: Ubuntu

Ever need to check if a directory is exactly the same as another (including file contents)?

find . -type f -exec md5sum {} + | awk '{print $1}' | sort | md5sum

 

This runs md5sum on the individual md5sum hashes of each file.

Delete files older than x days

Posted by Kelvin on 22 Mar 2011 | Tagged as: Ubuntu

This entry is part 10 of 19 in the Bash-whacking series Delete files older than 7 days:   Change +7 to +14 for deleting files older than 14 days.

Next Page »