Crmgo Blog

General questions

← Blog / Linux

General questions

Posts: 3

System Information (CentOS, Red Hat)

System Information (CentOS, Red Hat)

· General questions

Here are a few simple commands to obtain the necessary system information. View total memory: # grep MemTotal /proc/meminfo MemTotal: 515340 kB View swap memory: # grep SwapTotal /proc/meminfo SwapTotal: 1048568 kB View processor model: # grep "model name" /proc/cpuinfo model name…

Search

Search

· General questions

Search for text in files: grep -rl 'what_to_find' /path Find files: find / -name "filename" Replace text1 with text2 in all *.php files. find -type f -name \*.php -exec sed -i -r 's/text1/text2/g' {} \;

Users and Groups in Linux

Users and Groups in Linux

· General questions

View all users: `cat /etc/passwd | grep :10[0-9][0-9]: | cut -d: -f1` View groups: `cat /etc/group` View which groups the user `user` belongs to: `group user`