$ yes "$(seq 232 255;seq 254 -1 233)" | while read i; do printf "\x1b[48;5;${i}m\n"; sleep .01; done
Just for fun.
Link: https://www.commandlinefu.com/commands/view/72/cycle-through-a-256-colour-palette
$ while true;do printf "$(awk -v c="$(tput cols)" -v s="$RANDOM" 'BEGIN{srand(s);while(--c>=0){printf("\xe2\x96\\%s",sprintf("%o",150+int(10*rand())));}}')";done
Generates a TV noise alike output in the terminal.
Link: https://www.commandlinefu.com/commands/view/24930/generates-a-tv-noise-alike-output-in-the-terminal
$ ps -eo cmd | awk '{print $1}'| sort -u | grep "^/" | xargs dpkg -S 2>/dev/null | awk -F: '{print $1}' | sort -u | xargs apt-mark showmanual
Sometimes we install programs, we forget about them, and they stay there wasting RAM. This one-liner try to find them.
$ bc -l <<< "scale=1000; 4*a(1)"
$ openssl speed md5
Measure the cpu performance: In-case if the cpu is thermal throttling then you can find it using this command. Check the first line of the output. Example: Doing md5 for 3s on 16 size blocks: 11406892 md5's in 2.98s ? #(When cpu is not throttling) Doing md5 for 3s on 16 size blocks: 110692 md5's in 2.98s ?? #(When cpu is thermal throttling) Practical use case: Once we had cooling outage in data center which caused thermal throttling in some of the worker nodes. We used this tool to prove that some servers are not performing well because of the cpu thermal throttling.
Link: https://www.commandlinefu.com/commands/view/24725/host-cpu-performance
$ cat /etc/issue
Link: https://www.commandlinefu.com/commands/view/42/display-which-distro-is-installed
$ mplayer -ao pcm -vo null -vc dummy -dumpaudio -dumpfile <output-file> <input-file>
eplace and accordingly.
Link: https://www.commandlinefu.com/commands/view/52/rip-audio-from-a-video-file.
$ export PS1='C:${PWD//\//\\\}>'
Link: https://www.commandlinefu.com/commands/view/149/make-bash-look-like-dos
$ dd if=/dev/zero bs=1024 count=1440 > floppy.img && mkdosfs floppy.img
mount with: mount -t msdos -o loop ./floppy.img /tmp/mnt
Link: https://www.commandlinefu.com/commands/view/181/create-a-dos-floppy-image
$ date --utc --date "2009-02-06 09:57:54" +%s
Simple way to get a timestamp from a date.
Link: https://www.commandlinefu.com/commands/view/248/convert-a-date-to-timestamp
$ doskey l=dir /OD $*
doskey is the Windows cmd.exe equivalent of the Unix alias. '$*' means 'all parameters' This example is like alias l='ls -alrt': it will display files from oldest to newest, for one or more directories. doskey /MACROS list macros defined for cmd.exe, like 'alias' list aliases defined for the current Unix shell.
Link: https://www.commandlinefu.com/commands/view/692/equivalent-of-alias-in-cmd.exe-doskey-macros
$ curl -s http://checkip.dyndns.org | sed 's/[a-zA-Z<>/ :]//g'
Just another curl command to get your public facing IP.
Link: https://www.commandlinefu.com/commands/view/746/another-curl-your-ip-command
$ history | awk '{print $2}' | sort | uniq -c | sort -rn | head
Link: https://www.commandlinefu.com/commands/view/869/list-of-commands-you-use-most-often
$ for (( i = 10; i > 0; i-- )); do echo "$i"; sleep 1; done
Countdown from 10 or whatever you want.
Link: https://www.commandlinefu.com/commands/view/974/count-down-from-10
$ curl checkip.amazonaws.com
Link: https://www.commandlinefu.com/commands/view/24670/get-your-public-ip-address-using-amazon
$ while sleep 1; do tput sc; tput cup 0 $(($(tput cols)-29)); date; tput rc; done &
You will see it on the corner of your running terminal.
Link: https://www.commandlinefu.com/commands/view/24714/console-clock