Supermind Search Consulting Blog 
Solr - Elasticsearch - Big Data

Reset wireless in Ubuntu 10.04 Lucid

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

This entry is part 9 of 19 in the Bash-whacking series Ever had your Intel wireless card play up on you in Ubuntu? You can't seem to reset it like the ethernet cards (i.e. with ifup and ifdown). Do this instead: sudo rmmod iwlagn && sudo modprobe iwlagn Replace iwlagn with your wireless card module […]

Download google video and youtube from command-line

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

This entry is part 8 of 19 in the Bash-whacking series clive is an awesome tool for downloading google video and youtube flash videos from the command-line. sudo apt-get install clive   # download google video in flv clive http://video.google.com/videoplay?docid=-1388254997387483895   # download youtube in mp4 clive –format=mp4 http://www.youtube.com/watch?v=JPyuH4qXLZ0   # download list of URLs […]

Recursively copy only files with certain extension with rsync

Posted by Kelvin on 16 Jan 2011 | Tagged as: Ubuntu

This entry is part 6 of 19 in the Bash-whacking series Sometimes you want to get to all MP3 or PDF files which are nested in a deep directory tree. Here's what you do.. rsync -rvtW –delay-updates –modify-window=1 –progress –include='*.pdf' –include='*.xml' –exclude='*.*' source dest

Useful ffmpeg commands

Posted by Kelvin on 06 Dec 2010 | Tagged as: Ubuntu

This entry is part 5 of 19 in the Bash-whacking series Shameless ripped from http://www.catswhocode.com/blog/19-ffmpeg-commands-for-all-needs Getting infos from a video file ffmpeg -i video.avi Turn X images to a video sequence ffmpeg -f image2 -i image%d.jpg video.mpg This command will transform all the images from the current directory (named image1.jpg, image2.jpg, etc…) to a video […]

Download youtube videos as mp3

Posted by Kelvin on 04 Dec 2010 | Tagged as: Ubuntu

This entry is part 4 of 19 in the Bash-whacking series For Ubuntu.. sudo apt-get install ffmpeg   cd ~/bin wget https://github.com/rg3/youtube-dl/raw/2010.11.19/youtube-dl chmod +x youtube-dl   wget http://www.supermind.org/scripts/youtube2mp3 chmod +x youtube2mp3 The contents of youtube2mp3 is simple: #!/bin/bash #!/bin/bash   x=/tmp/.youtube-dl-$RANDOM-$RANDOM.flv youtube-dl –output=$x –format=18 "$1" ffmpeg -i $x -vn -ar 44100 -ac 2 -ab 256k […]

Move up multiple directories in bash

Posted by Kelvin on 04 Dec 2010 | Tagged as: Ubuntu

This entry is part 3 of 19 in the Bash-whacking series Ever thought typing cd.. 5 times was silly? Try this up() function! Add this to .bash_profile or .bashrc up () { if [ -z $1 ]; then cd .. elif [ $1 -gt 0 ]; then let count=0 while [ $count -lt $1 ]; […]

Recursively delete .svn folders

Posted by Kelvin on 04 Dec 2010 | Tagged as: Ubuntu

This entry is part 2 of 19 in the Bash-whacking series #!/bin/bash find ./ -name ".svn" | xargs rm -Rf

Introducing Bash-whacking

Posted by Kelvin on 04 Dec 2010 | Tagged as: Ubuntu

This entry is part 1 of 19 in the Bash-whacking series Starting a new blog series on bash scripts you shouldn't live without. Installation for scripts is simple: either add them to /usr/bin or add ~/bin to your bash path and place your scripts there. Don't forget to make the scripts executable! Here's a complete […]

Recursive directory listing sorted by file size

Posted by Kelvin on 03 Dec 2010 | Tagged as: Ubuntu

This entry is part 7 of 19 in the Bash-whacking series Ever wanted to list a directory sorted by decreasing file size? Useful for finding large files.. du -k * | sort -nr | cut -f2 | xargs -d '\n' du -sh Courtesy of LinuxQuestions.org

« Previous Page