Last active
February 9, 2019 09:13
-
-
Save epynic/783a638293356194e8eb443607c5ea1d to your computer and use it in GitHub Desktop.
linux-grep examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ls /usr/bin | grep zip # list all zip files | |
ls /usr/bin | grep -c zip # list all zip files count | |
ls /usr/bin | grep -v zip # list all !zip files = not containing the pattern | |
ls /usr/bin | grep -n zip # list all zip files - frints the line:file | |
grep -i linux file_name.txt #find in files ignore case |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment