http://www.commandlinefu.com/commands/browse/sort-by-votes

To tar from one dir to another:
$tar cf - . | (cd /dir; tar xvf -)

To pull from a remote host to local
ssh server 'tar zcvf - /dir' | tar zxvf -

To push from local to remote
tar zcvf - /dir | ssh dawg@remotehost 'cd /dir; tar zxvf -"

export PATH=$PATH:/usr/java/java/bin  setting your path!
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
sudo !!   # to redo a command you forgot to start with sudo
cp file{,.bak}  copies the file into a file.bak  very cool
:w !sudo tee %   # to save from vi or vim when you forgot to start with sudo
cd -  # change to the previous dir like cd ..
^foo^bar  #change foo to bar in last command
ssh-copy-id user@host  # copy passwordless keys to host  first run ssh-keygen
> file.txt  #empty a file not delete empty.
 COMMAND  # KEEPS COMMAND OUT OF HISTORY
ssh user@host cat /path/to/remotefile | diff //path/to/localfile - # diffs file from other host.
time read  # does a realtime user and sys time ctrl D to stop
(cd /tmp && ls)  #jump to a dir run command and come back
telnet towel.blinkenlights.nl  #plays text start wars. really cool
ping -i 60 -a IP_ADDRESS  # sounds alarm when come online
echo "!!" > foo.sh  # creates a script of your last executed command
^Z $bg $disown # put process in backgrownd and disown it to log out.
mv filename.{old.new}  #renames the appended part of the file
ssh host -l user $(