Search String: Find and Grep

前端 未结 4 2013
忘掉有多难
忘掉有多难 2021-02-04 17:13

There must be a better / shorter way to do this:

# Find files that contain  in current directory
#   (including sub directories) 
$ find .          


        
4条回答
  •  醉梦人生
    2021-02-04 17:35

    Pretty sure that's the only way. You'll have to reiderate through each folder, then through each subfolder and check each file.
    Only other thing i can think of is in server code throw the directory and file structure into a LINQ query and then you can do a sql-like query against it. but then the server is going to end up doing pretty much the same thing.

提交回复
热议问题