linux

GREP

GREP search
Recursively search all dirs and subdirs and output the results to fount.txt

find . -exec grep -q "Text_I_am_looking_for" '{}' \; -print >found.txt

Bash prompt with Git branch indicator

To make your terminal prompt more helpful than just telling you what directory you are in, you can make it include your full location and your current git branch. To do so, do the following 2 steps:

1) In your terminal, logged into your dev run:

curl https://raw.github.com/git/git/master/contrib/completion/git-prompt.sh -o ~/.git-prompt.sh -k

Then in your dev open the file .bash_profile and replace all the code with

# .bash_profile

Pages

Subscribe to RSS - linux