October 29th, 2009
This script will run check for ubuntu launch once every 5 mins and let you know if there is an launch.
while [ 1 ]; do if [ -z "`curl -I "http://cdimage.ubuntu.com/releases/9.10/release/"|grep "404"`" ]; then kdialog --msgbox "9.10 Released"; exit; fi; sleep 300; done
Posted in Code, Command Line, Linux | No Comments »
Tagged with: bash, command, curl, launch, Linux, script, shell, ubuntu
August 21st, 2009
Run this command to find the installed version of Ubuntu…
cat /etc/lsb-release
Posted in Command Line, Linux | 4 Comments »
Tagged with: command, Linux, release, ubuntu, version
July 25th, 2009
Run top in batch mode
top -b -d 10 -n 3
Posted in Command Line, Linux | No Comments »
Tagged with: batch, cli, command, filler, Linux, top
July 22nd, 2009
Transfer stdin and stdout to and from machines over the network
ssh remote_machine 'cat - > file' < file
Posted in Command Line, Linux | No Comments »
Tagged with: cat, filler, network, shellfu, ssh, stdin
July 7th, 2009
Use this command to add line numbers to a text file…
sed = filename.txt | sed 'N;s/\n/\t/' > filename_number.txt
Posted in Command Line, Linux | 3 Comments »
Tagged with: command, line, Linux, number, numbering, sed, shellfu
July 6th, 2009
Install a list of packages from a text file.
cat packages.txt | xargs apt-get install
Posted in Command Line, Linux | No Comments »
Tagged with: command, file, install, Linux, list, package, text
July 4th, 2009
Different way to use the rename command.
rename 's/.html$/.php/' *.html
Posted in Command Line, Linux | No Comments »
Tagged with: command, file, Linux, rename, shellfu
July 3rd, 2009
Useless – but fun – get a random Futurama Quote
curl -Is slashdot.org | egrep '^X-(F|B)' | cut -d \- -f 2
Posted in Command Line, Linux | No Comments »
Tagged with: curl, futurama, quote, random, slashdot
July 2nd, 2009
Use this command to create a random password
< /dev/urandom tr -dc A-Za-z0-9_ | head -c8
Also see…
Posted in Command Line, Linux | No Comments »
Tagged with: command, head, Linux, password, random, shell, shellfu, tr, urandom
June 30th, 2009
CDPATH is to cd what PATH is to exectable. You can go to a folder inside any of the CDPATH folders by just cd 'folder name' – no mater where you are currently.
export CDPATH='.:~:/var/www/html:~/Scripts'
Posted in Command Line, Linux | No Comments »
Tagged with: cdpath, command, Linux, path, shellfu