Search Commands Lab
Learn to use Bash to search the filesystem
- Search the filesystem for CSV files:
find -name "*.csv"
- What did you find?
- Search the filesystem for
.txt
files:find -name "*.txt"
- What did you find?
- Use the following command to find text inside the searched files:
find -name "*.txt" | xargs grep Apple
- What did you find out?
- Run the following command:
grep -R Banana .
- What did you find out?
- What are the pros and cons of the first approach and the second approach?