Archive for the 'Command Line' Category
Thursday, 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 »
Friday, August 21st, 2009
Run this command to find the installed version of Ubuntu…
cat /etc/lsb-release
Posted in Command Line, Linux | 4 Comments »
Saturday, July 25th, 2009
Run top in batch mode
top -b -d 10 -n 3
Posted in Command Line, Linux | No Comments »
Wednesday, 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 »
Tuesday, 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 »
Monday, 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 »
Saturday, July 4th, 2009
Different way to use the rename command.
rename 's/.html$/.php/' *.html
Posted in Command Line, Linux | No Comments »
Friday, 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 »
Thursday, 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 »
Tuesday, 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 »