14,954
edits
| Line 276: | Line 276: | ||
#* {{kbd | key=kill -9 <PID>}}. Force to kill the process with PID number: 101, enter {{kbd | key=kill -9 101}}. <ref>[http://linux.vbird.org/linux_basic/0440processcontrol.php#killjobs 鳥哥的 Linux 私房菜 -- 第十六章、程序管理與 SELinux 初探]</ref> | #* {{kbd | key=kill -9 <PID>}}. Force to kill the process with PID number: 101, enter {{kbd | key=kill -9 101}}. <ref>[http://linux.vbird.org/linux_basic/0440processcontrol.php#killjobs 鳥哥的 Linux 私房菜 -- 第十六章、程序管理與 SELinux 初探]</ref> | ||
=== Search | === Search and extract string from command output === | ||
* {{kbd | key=''linux command'' <nowiki>|</nowiki> awk '/''string''/'}} ({{Linux}}) ex: | * {{kbd | key=''linux command'' <nowiki>|</nowiki> awk '/''string''/'}} ({{Linux}}) ex: | ||
** keyin {{kbd | key=<nowiki>dpkg --get-selections | awk '/tar/'</nowiki>}} to search the installed package naming ''tar'' for Ubuntu.<ref>[http://www.linuxquestions.org/questions/linux-newbie-8/logical-operators-in-grep-775595/ logical operators in grep]</ref> | ** keyin {{kbd | key=<nowiki>dpkg --get-selections | awk '/tar/'</nowiki>}} to search the installed package naming ''tar'' for Ubuntu.<ref>[http://www.linuxquestions.org/questions/linux-newbie-8/logical-operators-in-grep-775595/ logical operators in grep]</ref> | ||
| Line 282: | Line 282: | ||
* {{kbd | key=''linux command'' <nowiki>|</nowiki> grep ''string''}} ({{Linux}}) ex: keyin {{kbd | key=<nowiki>yum list installed | grep tar</nowiki>}} to search the installed package naming tar for CentOS.<ref>[http://alvinalexander.com/unix/edu/examples/grep.shtml Unix/Linux grep command examples | grep command in Unix and Linux | grep examples | alvinalexander.com]</ref> | * {{kbd | key=''linux command'' <nowiki>|</nowiki> grep ''string''}} ({{Linux}}) ex: keyin {{kbd | key=<nowiki>yum list installed | grep tar</nowiki>}} to search the installed package naming tar for CentOS.<ref>[http://alvinalexander.com/unix/edu/examples/grep.shtml Unix/Linux grep command examples | grep command in Unix and Linux | grep examples | alvinalexander.com]</ref> | ||
* {{kbd | key=''Windows command'' <nowiki>|</nowiki> find ''"string"''}} ({{Win}}) ex: {{kbd | key=<nowiki>netstat -a | find "3306"</nowiki>}} (note: enclose string in double quotation marks)<ref>[http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/find.mspx?mfr=true Microsoft Windows XP - Find]</ref> | * {{kbd | key=''Windows command'' <nowiki>|</nowiki> find ''"string"''}} ({{Win}}) ex: {{kbd | key=<nowiki>netstat -a | find "3306"</nowiki>}} (note: enclose string in double quotation marks)<ref>[http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/find.mspx?mfr=true Microsoft Windows XP - Find]</ref> | ||
=== System CPU, memory and disk space usage === | === System CPU, memory and disk space usage === | ||