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!
Linux file search by 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
Search for specific files with specific content
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
- Семенов Александр
- /
- Jul 30, 2015
- /
- 0
- /
- 7622
Popular
Happy New Year and Merry Christmas!
- Dec 30, 2022
SaleEvent Markup
- Nov 23, 2022
We continue to improve the tools of the online store
- Oct 27, 2022
All Comments (0)