Find the file content find+grep

  

See the command of a buddy on Chinaunix to find the contents of the file:--------------------------- --------------------------------#> find . -type f -exec grep 'mingtian' -l {} \\;grep -l : is the file name that displays the matching content! Or: #> find . -type f -name "*.*" | Xargs grep 'xiaoshou' -l (this method is not good, quite messy, slow, recommend the previous method!) ------------------------ ----------------------------------- I think that the methods I use are also good, specially recorded: #grep " ;printf" $(find . -name *.c)

Copyright © Windows knowledge All Rights Reserved