Re: [techtalk] Limits of grep?

2000-09-30 Thread Subba Rao

On  0, Julie <[EMAIL PROTECTED]> wrote:
> From: Subba Rao <[EMAIL PROTECTED]>
> > I have a directory of 1+ text files and would like to search for
> > some strings in these files. When I tried using "grep" command with an
> > asterisk, I get the error message somthing to the effect,
> >
> > "File argument list too long"
> 
> You're exceeding the longest argument list which can be passed
> to a command via the exec() call.  This is NCARGS_MAX.
> 
> > What is the file argument limit for grep? I guess you need the grep source
> > for this. I did not find any information in the man page.
> 
> Nope, this is a kernel limit.
> 
> > Are there any other recommended tools to search through such large list of
> > files?
> 
> find . -type f -print | xargs grep  /dev/null
> 

Julie,

Thank you for replying. I tried the following solution and it works very fast.

find  -print | xargs -n 500 grep 

Using the "-type f" is a very good idea.

Thanks to everyone who replied with some solution!

-- 

Subba Rao
[EMAIL PROTECTED]
http://pws.prserv.net/truemax/

___
techtalk mailing list
[EMAIL PROTECTED]
http://www.linux.org.uk/mailman/listinfo/techtalk



[techtalk] Kernel params

2000-09-30 Thread Kathryn Hogg

Can someone point me to documentation on the available linux kernel
params and how I go about querying and modifying them?  It appears that
I'm either hitting the system limit for open files or the user limit. 
"lsof | wc -l" tells me that I have 2843 open files at the moment.

And another thing, what is udpd?  It appears to be a udp version of tcpd
but I can't find any documention or where it might be referenced.

--
Kathryn Hogg

___
techtalk mailing list
[EMAIL PROTECTED]
http://www.linux.org.uk/mailman/listinfo/techtalk



[techtalk] Best OS for NAT?

2000-09-30 Thread Kath



My school district is planning to switch from WinNT boxes 
running proxy software to Network Address Translation.  I'm gonna try to 
convince the guy from the tech company who does our 'net stuff to use a Linux 
distro.  Which one would be the best to use?  I'm favorable towards 
Debian, what are your thoughts?
 
Or would I be better off to use a BSD, like 
OpenBSD?
 
- Kathy


Re: [techtalk] Does there exist...?

2000-09-30 Thread Olivier Tharan

Le 28 septembre 2000 a 10:26, Lyta Alexander a écrit :
> or maybe start an X session inside of screen
> (can't say i've tried that though, just a guess)

I just tried this solution, but it halts on this error:

$ startx

X: user not authorized to run the X server, aborting.
xinit:  unexpected signal 2

Anyway, I am not sure that screen would be able to restore such a
context, it is just made to save some text sessions. In fact, the man
page describes screen(1) like this:

Screen is a full-screen window manager that multiplexes  a
physical  terminal  between  several  processes.

We are thus on the tty level here. Screen has many advantages, however,
but that was not the point of the question at first.

olive
-- 
Olivier Tharan, <[EMAIL PROTECTED]>

Fermez les yeux et pressez sur ESC trois fois.

___
techtalk mailing list
[EMAIL PROTECTED]
http://www.linux.org.uk/mailman/listinfo/techtalk



Re: [techtalk] Does there exist...?

2000-09-30 Thread Nicole Zimmerman


Here's what we do:

 is the box you want to run the apps *from* and  is the
box you want to run apps *on* (i.e. where they should display)

ssh 
export DISPLAY='server:0.0'

on 
xhost +client

then on 
run your x apps... they will display on your  box :o)

In your ssh setup you have to make sure you have X11Forwarding enabled.
For OpenSSH this is in /etc/ssh/sshd_config ... I think in most
distributions of OpenSSH it is disabled by default, and you should be able
to specify exactly what hosts are able to connect instead of the whole
universe (xhost does some regulating of this also).

I've only done it through SSH, and only from my work machine as client and
home machine as server (or vice versa)... my husband does it through SSH
on his lab network at work. It seems a little slow, but that could be my
hardware, it doesn't seem so slow on my husband's lab where the server is
a big ol' SMP machine and the clients are decent :o)

-nicole

At 18:14 on Sep 29, Olivier Tharan combined all the right letters to say:

> We are thus on the tty level here. Screen has many advantages, however,
> but that was not the point of the question at first.
> 
> olive


___
techtalk mailing list
[EMAIL PROTECTED]
http://www.linux.org.uk/mailman/listinfo/techtalk



Re: [techtalk] Does there exist...?

2000-09-30 Thread Nicole Zimmerman


> export DISPLAY='server:0.0'

This, of course, is only for bash. In csh it would be 
setenv DISPLAY server:0.0


-nicole



___
techtalk mailing list
[EMAIL PROTECTED]
http://www.linux.org.uk/mailman/listinfo/techtalk



Re: [techtalk] Does there exist...?

2000-09-30 Thread Laurel Fan

Excerpts from linuxchix: 30-Sep-100 Re: [techtalk] Does there e.. by
Nicole [EMAIL PROTECTED] 
[procedure snipped]
> In your ssh setup you have to make sure you have X11Forwarding enabled.
> For OpenSSH this is in /etc/ssh/sshd_config ... I think in most
> distributions of OpenSSH it is disabled by default, and you should be able
> to specify exactly what hosts are able to connect instead of the whole
> universe (xhost does some regulating of this also).

If I understand what you're doing, this actually doesn't do ssh
forwarding.  It's just plain remote X clients, and will work through
any method of connecting to the X-client-running-machine.  (Note that
the above method will allow anyone on the remote machine to do
anything to your X, so only do it if you trust everyone who can log in
to the remote) If you want to do it through ssh, try:

ssh -X -l  

The -X enables X11 forwarding.

Done this way, it'll only allow you on the remote to access your X.
(actually, only that particular ssh connection)



___
techtalk mailing list
[EMAIL PROTECTED]
http://www.linux.org.uk/mailman/listinfo/techtalk



Re: [techtalk] Does there exist...?

2000-09-30 Thread Aaron Malone

On Sat, Sep 30, 2000 at 03:57:10PM -0400, Laurel Fan wrote:
> If I understand what you're doing, this actually doesn't do ssh
> forwarding.  It's just plain remote X clients, and will work through
> any method of connecting to the X-client-running-machine.  (Note that
> the above method will allow anyone on the remote machine to do
> anything to your X, so only do it if you trust everyone who can log in
> to the remote) If you want to do it through ssh, try:
> 
> ssh -X -l  
> 
> The -X enables X11 forwarding.
> 
> Done this way, it'll only allow you on the remote to access your X.
> (actually, only that particular ssh connection)

This is correct.  The method originally described completely defeats the
purpose of ssh X11 forwarding.  Note that for this to work, the
sshd_config file on the remote machine must have a "X11Forwarding yes"
line, and the "-X' directive can be eliminated by adding the line
"ForwardX11 yes" for that host (or all hosts, if you'd like) in ssh_config
on the client machine.

If you get the message "Warning: remote host denied X11 forwarding" on
connection, the remote machine likely has forwarding disabled.  If you get
no warning and want to make sure forwarding is enabled (before incurring
the bandwidth overhead of actually running something), type:

echo $DISPLAY

if forwarding is enabled, you should see something like:

aaron@raul ~ % echo $DISPLAY
raul.munge.net:10.0

This display (:10.0) is a 'fake' server that forwards the X app back to
your client machine.  Note also that the display offset is configurable in
sshd_config, it should default to 10, as seen above.

-- 
Aaron Malone ([EMAIL PROTECTED])
System Administrator "Some companies think of training as a
Poplar Bluff Internet, Inc.cost rather than an investment."
http://www.semo.net -- Paul Collins

___
techtalk mailing list
[EMAIL PROTECTED]
http://www.linux.org.uk/mailman/listinfo/techtalk



Re: [techtalk] Best OS for NAT?

2000-09-30 Thread Aaron Malone

On Sat, Sep 30, 2000 at 09:39:50AM -0400, Kath wrote:
> My school district is planning to switch from WinNT boxes running proxy
> software to Network Address Translation.  I'm gonna try to convince the
> guy from the tech company who does our 'net stuff to use a Linux distro.
> Which one would be the best to use?  I'm favorable towards Debian, what
> are your thoughts? 
> 
> Or would I be better off to use a BSD, like OpenBSD?

I've been playing with NAT (usually called IP Masquerading on linux) with
Debian 2.2 recently, and find it eminently easy to set up and use with the
'ipmasq' package (apt-get install ipmasq) which will automatically
recompute the masqerading rules for ipchains.

As I haven't tried this on BSD, I can't really comment.  Well, I can
comment that I really like FreeBSD. :)

-- 
Aaron Malone ([EMAIL PROTECTED])
System Administrator"We learn from history that we learn
Poplar Bluff Internet, Inc.nothing from history."
http://www.semo.net  -- George Bernard Shaw

___
techtalk mailing list
[EMAIL PROTECTED]
http://www.linux.org.uk/mailman/listinfo/techtalk



Re: [techtalk] Does there exist...?

2000-09-30 Thread Nicole Zimmerman

> This is correct.  The method originally described completely defeats the
> purpose of ssh X11 forwarding.  Note that for this to work, the
> sshd_config file on the remote machine must have a "X11Forwarding yes"
> line, and the "-X' directive can be eliminated by adding the line
> "ForwardX11 yes" for that host (or all hosts, if you'd like) in ssh_config
> on the client machine.

Honestly, my intent was not to securely do it, but just to get it
working... like I said I've only done it over trusted networks. ssh is how
I connect telnet-style by default...

I apologise for not making that clear, and I guess I deserved the not so
pleasant response I got for not doing so.

> aaron@raul ~ % echo $DISPLAY
> raul.munge.net:10.0
> 
> This display (:10.0) is a 'fake' server that forwards the X app back to
> your client machine.  Note also that the display offset is configurable in
> sshd_config, it should default to 10, as seen above.

This is the official SSH step we were missing in what I described... I
never separated out the SSH x forwarding problem from just using xhost
*shrug* (excuse my lameness there)

-nicole


___
techtalk mailing list
[EMAIL PROTECTED]
http://www.linux.org.uk/mailman/listinfo/techtalk