wiki:bash_tips

Tips in Bash | Shell

(Mostly from Command Line Magic)

  • Download images in sequence IMG_0001.JPG through IMG_0176.JPG
curl --remote-name 'http://www.example\.com/images/IMG_[0001-0176].JPG'
  • Sometimes you get yourself into weird situations/trapped signals where Ctrl-C and Ctrl-D don't work. Try Ctrl-z and kill %1.
  • Monitor your dynamic CPU frequency in Linux in real time using the watch and grep commands. (ty Command Line Magic@climagic)
watch -n 0.1 "grep "[M]Hz" /proc/cpuinfo"
  • Renamming label of a USB Key in bash (ext format only)
sudo e2label /dev/sdb "New Label"
  • Replay matrix dsicussion on the shell
clear ; for t in "Wake up" "The Matrix has you" "Follow the white rabbit" "Knock, knock";do clear;pv -qL10 <<<$'\e[2J'$'\e[32m'$t$'\e[37m';sleep 5;done
  • wiki/bash_tips.txt
  • Last modified: 2019/12/28 15:19
  • by lyokolux