Unix Blog

Friday, January 28, 2011

Unix services restart

Restart network services
services network restart

posted by Jayanthi Krishnamurthy @ 7:49 PM   0 Comments

Thursday, January 27, 2011

grep search

To recursively search for a string in Linux
grep -ir searchstring *

To match exact search string
grep -w searchstring *

Ex:
line1: 192.168.80.14
line2: 192.168.80.141

grep 192.168.80.14 * will return both lines
grep -w 192.168.80.14 * will return only first line

To limit no. of grep results
grep searchstring * -m 1

Ex:
line1: 192.168.80.14
line2: 192.168.80.141

grep 192.168.80.14 * will return both lines
grep 192.168.80.14 * -m1 will return only one line

posted by Jayanthi Krishnamurthy @ 10:23 AM   0 Comments

Newer›  ‹Older

About Me

Name: Jayanthi Krishnamurthy

View my complete profile

Posts

  • Unix services restart
  • grep search

Older Posts Newer Posts

Archives

  • December 2008
  • January 2009
  • March 2009
  • April 2009
  • August 2009
  • September 2009
  • October 2009
  • November 2009
  • March 2010
  • April 2010
  • October 2010
  • November 2010
  • December 2010
  • January 2011
  • March 2011
  • April 2011
  • June 2011
  • July 2011
  • August 2011
  • November 2011
  • January 2012
  • September 2012
  • October 2013
  • November 2013
  • January 2014
  • April 2014
  • September 2014
  • December 2014
  • March 2015
  • April 2015
  • July 2015
  • Current Posts

Subscribe to
Posts [Atom]