Trasfer over the network
Transfer stdin and stdout to and from machines over the network
ssh remote_machine 'cat - > file' < file
Transfer stdin and stdout to and from machines over the network
ssh remote_machine 'cat - > file' < file
Use this command to add line numbers to a text file…
sed = filename.txt | sed 'N;s/\n/\t/' > filename_number.txt
Install a list of packages from a text file.
cat packages.txt | xargs apt-get install
Different way to use the rename command.
rename 's/.html$/.php/' *.html
Useless – but fun – get a random Futurama Quote
curl -Is slashdot.org | egrep '^X-(F|B)' | cut -d \- -f 2
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'
You can use this command to create a screencast using ffmpeg.
ffmpeg -f x11grab -s 800x600 -i :0.0 /tmp/screencast.mpg
Backup all delicious bookmarks using this command
wget --user=username --password=password https://api.del.icio.us/v1/posts/all -O bookmarks.xml
Replace one string by another in all file found by find.
find . -name *whatyouwant* -exec perl -pi.bak -e 's/TEXT_TO_REPLACE/TEXT_TO_REPLACE_IT_WITH/g' {} \;