Created
November 1, 2016 14:24
-
-
Save rhydlewis/9d4e5ff5850696dbdfe156c30b4a7d38 to your computer and use it in GitHub Desktop.
Useful Bash commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find and count file extensions in a directory | |
find . -type f | sed -e 's/.*\.//' | sort | uniq -c | sort -rn | |
# Rename group of files | |
for old in \*.txt; do mv $old `basename $old .txt`.md; done | |
# Resize group of images | |
for f in \*.jpg; do convert $f $f.pdf; done | |
# Download youtube playlist video | |
youtube-dl -o '%(title)s.%(ext)s' "https://www.youtube.com/watch?v=GYFteQuoT-o&list=PLGOsbT2r-igmFK9IKEGAnBaklqtuW7l8W" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment