Post

There are several command line incantations that I have had to look up at least a dozen times. Finding a string in Python files grep -r --include \*.py 'string I am looking for' . Find files by name find . -name '*partial_name*'

Find and replace all occurrences of a string in a directory's Python files sed -i '.bak' -e 's/old string/new string/g' *.py To drill deeper on any of these run man <command>. I find the examples section at the end most helpful. I'm compiling a list of these here brandonrohrer.org/shell_tricks...

brandonrohrer.orgbrandonrohrer.orgThere are several command line incantations that I have had to look up at least a dozen times. I'm compiling a handy cheat sheet of them here.

0 reposts2 likes

No replies yet.