- 將使用者加入Sudoer檔
- 使用指定的使用者執行程式
- 針對某Program發Signal
- 找尋大於某Size的檔案
- 查詢硬體與系統設定的關係
#lshw
// 查詢網路卡
#lshw -class network
#sudo adduser sudo
#su -c '${program_name}' ${username}
example:
#su -c 'php test.php' www-data
example:
#su -c 'php test.php' www-data
#ps -aux | grep ${program_name} | grep "grep" -v | awk '{print $2}' | xargs kill -${signal_num}
example:
#ps -aux | grep test.php | grep "grep" -v | awk '{print $2}' | xargs kill -15
example:
#ps -aux | grep test.php | grep "grep" -v | awk '{print $2}' | xargs kill -15
#find . -type f -size -4096c
Parameter:
`b' for 512-byte blocks (this is the default if no suffix is used)
`c' for bytes
`w' for two-byte words
`k' for Kilobytes (units of 1024 bytes)
`M' for Megabytes (units of 1048576 bytes)
`G' for Gigabytes (units of 1073741824 bytes)
Parameter:
`b' for 512-byte blocks (this is the default if no suffix is used)
`c' for bytes
`w' for two-byte words
`k' for Kilobytes (units of 1024 bytes)
`M' for Megabytes (units of 1048576 bytes)
`G' for Gigabytes (units of 1073741824 bytes)
沒有留言:
張貼留言