Skip to content

Instantly share code, notes, and snippets.

@aswinsekar
Last active September 12, 2023 14:49
Show Gist options
  • Save aswinsekar/9aed5b94409e1d23a8825951db2f57eb to your computer and use it in GitHub Desktop.
Save aswinsekar/9aed5b94409e1d23a8825951db2f57eb to your computer and use it in GitHub Desktop.
Bash Terminal command reference
#will list the calendar in the linux
cal
#Generate a sha256 sum of text
# for mac
echo -n <text> | shasum -a 256
# for linux
echo -n <text> | sha256sum
# sort and list the directories by size
du -hs */ | sort -hr | head
# immediate file server
python3 -m http.server
# display your external IP
curl ipinfo.io
# list the authors in the repo
git log --format='%aN' | sort -u
# list the most used linux commands
history | awk '{print $2}' | sort | uniq -c | sort -rn | head
# remote file transfer instead of scp $1 - src files $2 - target dir
rsync -azhe ssh --progress $1 $2
# best video compression using ffmpeg
ffmpeg -i input.mp4 -vcodec libx265 -crf 28 output.mp4
# https://unix.stackexchange.com/questions/28803/how-can-i-reduce-a-videos-size-with-ffmpeg
# mov to mp4
ffmpeg -i input.mov -q:v 0 output.mp4
# https://stackoverflow.com/questions/12026381/ffmpeg-converting-mov-files-to-mp4
# google auth to qr code - Reverse engineer
https://github.com/dim13/otpauth
# download the binary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment