Common Linux Commands – Part 2

Common Linux Commands - Part 2

File Search Commands: 1. find directory -name “filename“ – Search for files by name 2. find directory -type f -name “*.txt” – Find specific type of files 3. grep “text” filename – Search for text in a file 4. grep -r “text” directory – Recursively search for text in a directory 5. locate filename – … Read more

Linux File Search Tools: Locate vs Find

Linux File Search Tools: Locate vs Find

1. Locate 1. Performance Overview Queries the pre-built file index database on the system /var/lib/mlocate/mlocate.db Note: If this file is deleted, locate will not work. You need to manually update the database (updatedb) or restart the system for locate to function again. Relies on a pre-built index: The index is constructed automatically during idle times … Read more