Linux的權限不是很細緻,只有RWX三種linux
r(Read,讀取):對文件而言,具備讀取文件內容的權限;對目錄來講,具備瀏覽目錄的權限。bash
w(Write,寫入):對文件而言,具備新增,修改,刪除文件內容的權限;對目錄來講,具備新建,刪除,修改,移動目錄內文件的權限。xml
x(eXecute,執行):對文件而言,具備執行文件的權限;對目錄了來講該用戶具備進入目錄的權blog
#!/usr/bin/env bash Find_evil_process(){ echo "***************Find evil process (/tmp、/var/tmp、/dev/shm)***************" ls /proc/ -tr | grep -v "[a-z]" | while read line do if [ -d "/proc/$line" ];then pname=`readlink /proc/$line/exe` echo $pname | egrep '^/(tmp|var/tmp|dev/shm)' >> /dev/null if [ $? -eq 0 ];then printf "%-20s %-20s\n" $line $pname fi fi done } main(){ Find_evil_process } main
驗證截圖以下:內存