Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 05 Oct 1998 12:13:51 -0700
From:      Studded <Studded@dal.net>
To:        Steve Friedrich <SteveFriedrich@Hot-Shot.com>
Cc:        "freebsd-newbies@FreeBSD.ORG" <freebsd-newbies@FreeBSD.ORG>
Subject:   Re: First commands
Message-ID:  <36191A6F.DA1B1D9@dal.net>
References:  <199810051421.KAA10542@laker.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Steve Friedrich wrote:

> At the top of the list, IMHO, should be apropos (yea, like anyone will
> remember how to spell it ;o)

	On most BSD's 'apropos' and 'whatis' do basically the same thing (which
actually is unfortunate because they are intended to do slightly
different but equally valuable functions). 

> Much of this material is already covered quite nicely in Greg's book.
> Why do we need to create more documentation that won't be read? 

	Some people aren't happy with a project unless it's their own original
work. However I'm all for anything that produces good documentation. 

Marty Poulin wrote:

> I'd add tail and grep to the list (with a good explanation of what exactly
> grep does - I'm still not entirely sure)

	Grep is a *wonderful* tool, and is well worth taking the time to learn.
The basic concept is that you use grep to find a word or phrase in a
file or group of files. I use it literally dozens of times a day. Let's
say that you get a weird error message that you don't understand and you
want to find out where in the code that error comes from. 

cd /usr/src
grep -iR "exact copy of weird error message" *

The -i flag uses a case insensitive search, and the -R flag means to
recurse down into the directory structure from /usr/src/ down. Once
you've found out where that error occurs it might lead you to a solution
to your problem. The quotes are needed around the phrase to tell grep
that you are searching for those words as a unit. 

	Another thing grep is good for is finding everything BUT a certain
thing. Say for example that you want to find out what lines in your
inetd.conf file are not commented out. Use, 'grep -v ^# /etc/inetd.conf'
and you will get the list. The -v option tells grep to show every line
that does not have the pattern. The ^ character stands for the beginning
of the line, and the # is the literal # character. 
 
Hope this helps,

Doug
-- 
***           Chief Operations Officer, DALnet IRC network          ***

    Go PADRES!

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-newbies" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?36191A6F.DA1B1D9>