• How to get the OS version

    lsb_release -a
    uname -a
    cat /etc/os-release

  • How to redirect error output to a file

    command 2> error.log
  • How to restart a server from another server

    ssh -t 'sudo reboot'


  • How to arcchive a folder

    tar -czvf ARCHIVE.tar.gz /path/to/folder/to/archive
  • How to unarchive a tar.gz file

    tar -xvf ARCHIVE.tar.gz


  • How to find specific files recursively

    find . -name ".DS_Store" -type f
  • How to delete specific files recursively

    find . -name ".DS_Store" -type f -delete
  • How to count the number of files with an extension

    find . -type f -name "*.java" | wc -l
  • How to search recursively with grep

    grep -r --include "*.java" "SEARCH TEXT" .


  • How to convert a PNG image to WebP with 80% quality

    cwebp -q 80 INPUT.png -o OUTPUT.webp
  • How to convert a MOV video to MP4

    ffmpeg -i -c:v copy -c:a copy OUTPUT.mp4