Home / Labs / Searching a Whole Tree
Searching a Whole Tree
A whole tree of files, and you need three things from it. Search by extension, by content, and by link.
Commands practised here
find . -name "*.sh"Every matching filename in the tree.grep -r "port=8080" .Search file contents recursively.head -n 1 fPrint the first line, often a shebang.ls -l linkShow where a symlink points.
Nearby labs
- All labsBrowse the full list.
- Exam prepWhich exams these objectives map to.
- Writing to Files
- System Information