14 ms·
Reminds me of "find", which is another tool that is mostly just used for its most boring application.
by erikb 10y ago
Reminds me of "find", which is another tool that is mostly just used for its most boring application.
- hasenj 10y agoWhat are some of its more interesting applications?
- erikb 10y agoIf you need to do anything on a list of files/dirs, but they are not in the same place, or not easily filterable (e.g., all sub directories "/Fillion" but not the ones that start with "Nathan") you can use find to prefilter everything, then hand it over via xargs (if you want all to be handled by one instance of the action program) or with "-exec" (if you want each instance to be handled by a separate instance by the action program). Also check out "find tutorial" articles like this one: http://www.grymoire.com/Unix/Find.html http://www.grymoire.com/Unix/Find.html (e.g., did you know you can filter by size?)
- koala_man 10y agoHow about "awk"? It's an entire programming language, but it's only ever used to get single fields.
- erikb 10y agoAWK is also awesome. AWK is in my category of languages you should learn even if you never use it (but you will for sure), because it enables another kind of thinking.