Tom Studer's Home Page
[ start | index | login ]
start > 2005-08-07 > 1

2005-08-07 #1

Created by tom. Last edited by tom, 6 years and 287 days ago. Viewed 356 times. #1
[edit] [rdf]
labels
attachments

Unix file search

Search files in a directory tree:

find . -name *.txt -exec grep -H 'text to search' '{}' ;

This searches all text files (*.txt) within the current directory and subdirectories for the string 'text to search' and prints the filename and line for each match.

no comments | post comment
mouse_cartoon



< May 2012 >
SunMonTueWedThuFriSat
12345
6789101112
13141516171819
20212223242526
2728293031

snipsnap-help | More Help

Powered by SnipSnap 1.0b2-uttoxeter

Describe here what your SnipSnap is about!

Configure this box!

  1. Login in
  2. Click here: snipsnap-portlet-2
  3. Edit this box
snipsnap.org | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt