Skip to content

Instantly share code, notes, and snippets.

@neuralvis
Last active February 3, 2021 18:45
Show Gist options
  • Save neuralvis/adbba46d8dfe339c394339d47a91cb0b to your computer and use it in GitHub Desktop.
Save neuralvis/adbba46d8dfe339c394339d47a91cb0b to your computer and use it in GitHub Desktop.

Search for a string within files in the current directory

grep -wrin "search for this text" .

Find subdirectories matching a pattern

find /your/directory -name "pattern*"

Find text in a file with lines above

bin/tdb | grep -iA 1 "SOMETHING"

Copy with exclusions

rsync -avrn --progress experiment.005 test/ --exclude "ap2-files" --exclude "xf-files"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment