Skip to content

Instantly share code, notes, and snippets.

@feihong
Last active October 28, 2015 03:43
Show Gist options
  • Save feihong/8f8e90100f8d4752848b to your computer and use it in GitHub Desktop.
Save feihong/8f8e90100f8d4752848b to your computer and use it in GitHub Desktop.
Bash cheatsheet

Find all files named .DS_Store:

find . -name '.DS_Store'

Find all files containing the string 'feihong', then replace occurrences of 'feihong.pythonanywhere' with 'chicktech.pythonanywhere'.

grep -rli 'feihong' * | xargs -i@ sed -i 's/feihong\.pythonanywhere/chicktech\.pythonanywhere/g' @
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment