Skip to content

Instantly share code, notes, and snippets.

@mojaveazure
Last active June 3, 2016 22:38
Show Gist options
  • Save mojaveazure/c4840edd8492fc108921ac6eaaded8a7 to your computer and use it in GitHub Desktop.
Save mojaveazure/c4840edd8492fc108921ac6eaaded8a7 to your computer and use it in GitHub Desktop.
Some commands that I come across and find useful

Useful Commands

Bash

Command Meaning
echo -en "\rSomeText" Return carriage to the beginning of the line (-e and \r), write "SomeText" at that point in time. Do not output a new line at the end of the statement (-n). Useful for dynamic terminal messages.
find . -exec touch -am {} \; Update the access and modified times for all files in this current directory and all subdirectories. Useful for keeping files around when set to expire after a given amount of time.
find . -name 'foo-exclude-me' -prune -o -name 'foo*' -print Find all files with foo*, ignoring foo-exlude-me
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment