[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-developers] Shel command
- Subject: Re: [cobalt-developers] Shel command
- From: Hans Riethmann - ortecin GmbH <hans@xxxxxxxxxx>
- Date: Thu Oct 16 10:54:01 2003
- Organization: ortecin GmbH
- List-id: Discussion Forum for developers on Sun Cobalt Networks products <cobalt-developers.list.cobalt.com>
find /home/sites -name index.html | xargs -i grep -l my_logo.jpg {}
assuming that you do not care about the frontpage control files in
the _vti_cnf directories, use this one
find /home/sites \( -name _vti_cnf -prune \) -o -name index.html | \
xargs -i grep -l my_logo.jpg {}
xargs speeds things up massively, the "-i" switch of xargs prevents
error messages
if you hit file names containing spaces.
have fun
Hans
Is their command to search for text within a file? I'm trying to find all
index.html files (in /home/sites/) containing the text my_logo.jpg.
i.e. locate index.html | [command to find my_logo.jpg]
-or-
Something like: find /home/sites/.*index.html | grep -v -g
'^/home/sites/.*/_vti_cnf' | [command to find my_logo.jpg]
- Chris
_______________________________________________
cobalt-developers mailing list
cobalt-developers@xxxxxxxxxxxxxxx
http://list.cobalt.com/mailman/listinfo/cobalt-developers
--
______________________________________________________________________
__ ortecin GmbH
/ / | Waffenplatzstrasse 40
,__ ,__ / _/,__ ,__. (_)__ | 8002 Zuerich
/ O \/ ,_\/ / / o_\/ __// / _ \ | hans at ortecin.ch
\___/_/ \_/ \___/\__\/_/_//_/ GmbH | Mobile: +41 79 689 1052
| Tel: +41 1 280 2829
organisation technology integration | Fax: +41 1 280 2827