This article is automatically synchronized by Tencent Cloud + Community, the original address is https://stackoverflow.club/article/quick_seach_in_cli_ubuntu/
find -follow | grep file_name
mlocate file_name
This is a quick file search command that comes with ubuntu. The principle is the same as everything on the windows platform. It temporarily stores the file name in the database and reads it directly from the database when searching.
Update database
sudo updatedb
Database address
/var/lib/mlocate/mlocate.db
Recursively find the contents of files in the current directory
grep -r 'keyword'.