Hands-on task
This task is step 19 of the course “find and xargs: search and bulk operations”
find + xargs grep
Under /root/src (including subdirectories) there are many files. Find the .txt files that contain the word TODO and write their full paths (/root/src/…, one per line) to /root/todo.txt. Use a find … | xargs grep pipeline. Don't include files with other extensions in the list.
What you'll practise:
- find
- xargs
- grep -l
- pipeline
- searching file contents