Skip to content

Instantly share code, notes, and snippets.

@retpolanne
Last active May 11, 2019 22:04
Show Gist options
  • Save retpolanne/918364e6541a263a9e0d3d5371b5df0b to your computer and use it in GitHub Desktop.
Save retpolanne/918364e6541a263a9e0d3d5371b5df0b to your computer and use it in GitHub Desktop.
Some useful bash commands
# Making substitutions on files where a certain pattern is found
fgrep -r "<something>" . | awk -F : '{print $1}' | xargs sed -i "s/<something>/<something else>/g" $@
## Mac OS specifics
## Cleaning up Time Machine snapshots
tmutil listlocalsnapshots / | awk -F "." '{print $4}' | while read dt; do tmutil deletelocalsnapshots $dt; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment