Skip to content

Instantly share code, notes, and snippets.

@adamreisnz
Last active May 8, 2020 09:49
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • 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 git@github.com: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