Thanks mike, I found what I needed from info i.e. grep -r '10.x' /path/to/be/searched
Help says try grep -ld 10.x I tried changing syntax to grep -l-directories 10. or l-directories=read or 'read' and so on but got nothing. What is correct syntax anyways? On a different note someone just asked me to set up a ftp account and restrict it's access to only one site e.g. /data/www/theirsiteonly. I think I saw on a prior post someone said create a user for ftp and change their shell to /bin/pftp then ln -s their home directory to the desired ftp login i.e. /data/www/theirsite.com/htdocs. Another post says to not have 'x' directory browseable do chmod 0711 /directory-of-choice which looks promising but not quite what I need. I've been reading a linux security book and I believe I recall it saying I'd need to specify an 'unmask' (not sure the spelling here) and subtract bits from 777 to lock down the user's access but that books at home :( justin -----Original Message----- From: Michael Jinks [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 05, 2002 2:34 PM To: [EMAIL PROTECTED] Cc: debian-user@lists.debian.org Subject: Re: a grep question On Tue, Mar 05, 2002 at 12:52:44PM -0800, justin cunningham wrote: > Hi, I read through man on find and grep and am trying to search for an > ip in some files contained in folders but every time I type in grep > options it just hangs. What am I doing wrong? We don't know unless you show us the precise command line you're using. Cut'n'paste from your terminal. > Conversely i can go into /site.com/cgi-bin then cat any.cgi | grep > 10.0.0.1 You could also $ grep '10.0.0.1' any.cgi ...you don't strictly need the cat command. > and will get the desired result but instead of doing this for 'every > file' in 'every folder' I want to search for the 10.ip in the files from > the site's root directory. One way: find /path/to/cgi-bin -type f -exec grep '10.0.0.1' {} \; (the {} and the \; are explained in the find manpage under the -exec directive. if you want to know the name of the file rather than getting back the line itself, one way is to give grep the -l option.) -- ## Michael Jinks, IB ## JFI/MRSEC Computing ## University of Chicago ## Reader! Think not that technical information ought not be called speech; -- Anonymous, "How to decrypt a DVD"