Skip to content

Instantly share code, notes, and snippets.

@rafaelune
Last active December 10, 2019 18:58
Show Gist options
  • Save rafaelune/fe4fc0200ad73fca7fe8 to your computer and use it in GitHub Desktop.
Save rafaelune/fe4fc0200ad73fca7fe8 to your computer and use it in GitHub Desktop.
unix cmds
# searches files inside jars
find foo/ -name "*.jar" | xargs grep Hello.class
locate "*.jar" | xargs grep Hello.class
# displays memory usage
free -m
# change permissions
chmod u=rwx,g=rx,o=r myfile
4 stands for "read", 2 stands for "write", 1 stands for "execute", and 0 stands for "no permission."
# finds and deletes all files ending with .orig
find . -type f -name '*.orig' -delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment