On Thu, Nov 08, 2001 at 10:18:40AM -0800, Tathagata Banerjee wrote:
> i was trying to search for the string "save text image" in 
> all man pages, so i did $man -K "save text image" and also
> $ man -K "save\ text\ image". in both cases, bash returned 
> "sh: unsafe: command not found." which kept scrolling thr-
> ough the screen until i ended it with ctrl-c. 
>
> however, "man -K" works nicely with single-word arguments.
> is this a bug or a feature?  :-) how can i find the speci-
> fied string in all man pages?
> 

Your syntax is absolutely right. Please see the output from
my box:

bish@aedes:~$man 1 -K "save test image"
/usr/man/man1/chmod.1.gz? [ynq] q
bish@aedes:~$exit

Please note the syntax. All strings must be in quotes as in
the sample above. In this case, please note, I have given 1
(to look for man 1's only) to reduce search time. man -K is
really time consuming. In this case, after I found that the
string is in chmod, I decided to quit ... I could have gone
more if I answered y or n.

Then where is the problem ? Note, the error message you are
getting is not a bash message. It is  probably  be from the
settings of lesspipe in your distro ...  Something is being
routed  through an "unsafe"  command,  which is not on your 
box. I am in no position to guess further ...

> and will someone enlighten me about the function of
> "chmod 1---  " ?
> chmod 4--- sets the user id.
> chmod 2--- sets the group id.
> 
> "man chmod" says "chmod 1---" sets "save text image".
> what is "save text image" ? how does it work?
> 
---end quoted text---

What your are looking at is 'man 2' of chmod and not man 1.
Most folk don't need man 2 pages (System Calls),  and  just
about need the man 1 pages (Commands). Do a 'man 7 man' for
finer details.

Unless you are in programming this info is of no use to you
Please see the first lines of man 2 chmod, and it goes some-
thing like '#include <sys/types.h>'... that should give you
hint enough. FYI, 01000 is to set sticky bit.  04000  is to
set user-id on execution ... and so on.

For the command chmod, read 'man 1 chmod' NOT 'man 2 chmod'

HTH

Bish

--
:
####[ Linux One Stanza Tip (LOST) ]###########################

Sub : HTML Mails :(                                  LOST #086

Using plain text mails is a better idea. Especially on mailing 
lists. These are readable by all, whereas HTML mail may not ..
Besides, they are smaller in size (bandwidth), with  less risk
of script nuisance.

####<[EMAIL PROTECTED]>#######################
:

_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help

Reply via email to