To find a string in various files on the system.
grep -rnw './path' -e 'pattern'
to search in current file
grep "string" filename
to find cpu
cat /proc/cpuinfo
To find memory
cat /proc/meminfo
grep -rnw './path' -e 'pattern'
to search in current file
grep "string" filename
to find cpu
cat /proc/cpuinfo
To find memory
cat /proc/meminfo
No comments:
Post a Comment