Happy New Year and Merry Christmas!
- Dec 30, 2022
Perhaps you know such a problem as: You can not find the file, but it is somewhere in the computer. Then find command is convenient.
You ask: How to use it? This program is given a huge man page, we will look at some common cases.
You can start with the simplest: If you know the name of the file, then you can easily find it! You just need to type the find command and specify a specific file name!
find -name love
For example, we will search for all files in mp3 format and make a complete list in the file:
file /home/artix -iname ".mp3" > ./list.txt
find private/ -iname '*.js' -exec grep -H 'eval(' '{}' ';' > /tmp/list-all.txt
find private/ -iname '*.js' -exec grep -H 'eval(function(p,a,c,k,e,d)' '{}' ';' > /tmp/list-final.txt
All Comments (0)