Terminal ( MacOS )

grep "png" 2022/01/*
grep "head" ./*

Explanation

“Grep is an acronym that stands for Global Regular Expression Print.

Grep is a Linux / Unix command-line tool used to search for a string of characters in a specified file. The text search pattern is called a regular expression. When it finds a match, it prints the line with the result. The grep command is handy when searching through large log files.”

It’s like a search query, but you use linux instead. Example:

grep "word" file.txt

This will find the instances where the word, “word” is in the file.txt file.

Result

Binary file Folder/filename.png matches
Binary file Folder/filename.png matches
Binary file Folder/filename.png matches
Binary file Folder/filename.png matches

Back To TIL