Skip to content

Instantly share code, notes, and snippets.

@adamreisnz
Last active May 8, 2020 09:49
Show Gist options
  • Save adamreisnz/c7a2764bd63bb1e82ad4 to your computer and use it in GitHub Desktop.
Save adamreisnz/c7a2764bd63bb1e82ad4 to your computer and use it in GitHub Desktop.
A bunch of useful terminal commands
find . -name '*.js' | xargs wc -l
du -sch .[!.]* * | sort -h
for f in *; do mv "$f" "$f.tmp"; mv "$f.tmp" "`echo $f | tr "[:upper:]" "[:lower:]"`"; done
find . -name '.DS_Store' -type f -delete
git remote set-url origin [email protected]:adamreisnz/repo.git
git remote -v
find . -name "*.js" | while read line; do expand -t 2 $line > $line.new; mv $line.new $line; done
Terminal commands
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment