grep -o ‘\<[[:alpha:]]+\>\(\)‘ /etc/rc.d/init.d/functions
echo "/etc/rc.d/init.d/" | grep -E -o ‘[^/]+$
echo "/etc/rc.d/init.d/" | grep -E -o ‘^/。*/‘
ifconfig | grep -E -o "\<([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\>"
find / -nouser -o -nogroup
find / -nouser -o -nogroup -atime 3
find /etc -size +1M -a -type f
find /etc/init.d/ -perm 111 -perm 002
find /etc -mtime -7 -not \(-user root -o -user hadoop\)
cp /etc/rc.d/rc.sysinit /tmp
末行模式%s/^[[:space:]]+[^[:space:]]/#&/g
末行模式下%s/^#[[:space:]]+/g
末行模式下%s/(enabled|gpgcheck)=0/\1=1/g
crontab -e
0 0 * * 2,4,6 cp -r /var/log/messages /backup/messages_logs/message-$(date +\%Y\%m\%d)
crontab -e
0 */2 * * * cat /proc/meminfo | grep ‘^S‘ >> /stat/memory.txt
\#!/bin/bash
for n in `seq 10 19`; do
if id user$n; then
echo "user$n already exist, please check"
else
useradd user$n
echo "user$n" | passwd --stdin user$n
fi
done
本文出自 “每天进步一点点” 博客,请务必保留此出处http://mywolfking.blog.51cto.com/1073386/1900678
原文地址:http://mywolfking.blog.51cto.com/1073386/1900678