Skip to content

Instantly share code, notes, and snippets.

@dikiaap
Last active June 6, 2022 05:21
Show Gist options
  • Save dikiaap/7b20f7ceac2301eebd55 to your computer and use it in GitHub Desktop.
Save dikiaap/7b20f7ceac2301eebd55 to your computer and use it in GitHub Desktop.
Command Line Cheatsheet

dotfiles ❤ ~/

dikiaap/dotfiles

Linux

  • Disable packages on Debian-based distro
    • sudo apt-mark hold package-name
  • Print the build date of Linux kernel using ISO 8601 format
    • uname -v | awk '{print $6,$5,$4,$8,$7;}' | xargs -I{} date -d "{}" "+%Y-%m-%d"
  • Remove config files
    • dpkg --list | grep '^rc' | awk '{ print $2 }' | xargs sudo apt-get purge

pnpm

  • Show list pnpm packages
    • pnpm list -g --depth=0
  • Show outdated pnpm packages
    • pnpm outdated -g --depth=0
  • Clean pnpm cache
    • pnpm cache clean

Composer

  • Clean composer cache
    • composer clear-cache

Wget

  • Download files from list
    • wget -i your-list

Weather

curl -s "https://wttr.in/?m2F&format=v2"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment