Skip to content

Instantly share code, notes, and snippets.

@josemarcosrf
Last active October 11, 2019 19:01
Show Gist options
  • Select an option

  • Save josemarcosrf/57019fcce95a17a268c846d95deace49 to your computer and use it in GitHub Desktop.

Select an option

Save josemarcosrf/57019fcce95a17a268c846d95deace49 to your computer and use it in GitHub Desktop.
Useful bash commands

Find text inside of a file

grep -rn . -e <your-pattern>

Find and replace

find /path/to/files -type f -exec sed -i 's/oldstring/new string/g' {} \;

Use find to create symlink to all files in some dir to the current dir

find <some-other-dir> -type f -exec ln -sf {} $(pwd) \;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment