Showing posts with label Terminal. Show all posts
Showing posts with label Terminal. Show all posts

Tuesday, April 26, 2011

How to grep in unix

The "grep" command allows you to find text within a file

grep -r -i main-content ../../

grep [options] [search query / pattern] [where]

Some options
-r / recursive: read all files under each directory, recursively
-i / ignore case: upper - lower case friendly



Tuesday, May 18, 2010

Terminal & Rails Console: Basic Navigation

So to show how much of a n00b I am, I am tracking the four commands that the pros use the most in this blog.

Control A - Beginning on the line
Control E - End of the line
Meta F - Forward one word
Meta B - Back one word

Note:
If you don't have Meta set up on your keyboard yet for your mac. In your Terminal > Preferences > Settings > Keyboard > Check box "Use option key as meta key"