[kwlug-disc] top 10 command line commands

Robert P. J. Day rpjday at crashcourse.ca
Tue Dec 15 09:38:49 EST 2009


On Tue, 15 Dec 2009, Insurance Squared Inc. wrote:

> I want to write a post on the top 10 linux command line commands.
> (for two reasons.  One, cause it's useful.  Two, because I only have
> a top 2, so I believe learning another 8 is going to help me work
> better :).
>
> Here's the top 2 of my top 10:
> grep -R string *   (find a string in a directory tree - useful for finding
> files with bits of code)

  you could do 10 commands on nothing more than variations on grep:

  grep -r <string> ...		as you mentioned above
  grep -rw <string> ...		must be separate word
  grep -rwl <string> ...	print only file name, which inspires

  $ vi $(grep -rwl <string .)

that last one using command substitution to take the output of the
grep command, and make it the arguments to the vi command.  i use that
last variation -- using grep to generate the arguments for another
command -- literally on a daily basis.

rday
--

========================================================================
Robert P. J. Day                               Waterloo, Ontario, CANADA

            Linux Consulting, Training and Kernel Pedantry.

Web page:                                          http://crashcourse.ca
Twitter:                                       http://twitter.com/rpjday
========================================================================




More information about the kwlug-disc mailing list