Last active
August 29, 2015 14:16
-
-
Save vaibhaw/dfd7ba98ccf2f46ede43 to your computer and use it in GitHub Desktop.
Linux Utilities
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
| ## recursive search only in specific filetypes | |
| grep -nr --include=<pattern> <string> <directory> | |
| # grep -nr -i --include *.{cpp,hpp,java} "isequal" . | |
| # grep -nr -i --include *.cpp --include *.hpp "isequal" . | |
| ## grep seach exact word | |
| grep -r -i /^word$/ . |
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
| # Get the CPU | |
| grep 'physical id' /proc/cpuinfo | sort -u | |
| # Get the core | |
| grep 'core id' /proc/cpuinfo | sort -u | wc -l | |
| # Get the threads | |
| grep 'processor' /proc/cpuinfo | sort -u | wc -l | |
| # Get the cpu version | |
| dmidecode -s processor-version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment