Flashcard 20 - 220-1202 Operating Systems Flashcard Set for the CompTIA A+ Core Series Exam
Back
ls | grep filename; This would provide a more efficient search.
Explanation:
This will cause a search for only lines that contain the filename. The ls command could give a listing of so many files that they would scroll by the screen too fast to view. Using the \(\lvert\) (pipe) symbol, you take the output from ls and use it as input to the grep command. The grep command has an argument filename which tells grep to search for and list only lines that contain the filename.
All Flashcard Sets for the CompTIA A+ Core Series Exam are now available as downloadable PDFs