Watch Star Wars via telnet

telnet towel.blinkenlights.nl

Russian Roulette in Bash

[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live"

Get your public IP address

curl ifconfig.me

Share a file between two computers

nc -l 5566 > data-dump.sql
nc 5566 < data-dump.sql

Recursively remove all empty directories

find . -type d -empty -delete

Empty a file

> file.txt

Create simple text file from command line

cat > file.txt
{your text here}
{your text here}

Jump to a directory. Execute a command. Jump back to current directory

(cd /tmp && ls)

Make directory including intermediate directories

mkdir -p a/long/directory/path

List of commands you use most often

history | awk '{print $2}' | sort | uniq -c | sort -rn | head

Pages

Subscribe to VPS Knowledge Base RSS