Thursday, April 21, 2011

Daily Linux Commands

find . -type d -exec chmod 755 {} \;

find . -type f -exec chmod 644 {} \;

mysqldump nuke | gzip > nuke.gz

gunzip -c survey.gz | mysql survey

#echo "1" > /sys/class/scsi_device/<device>/device/rescan

find -type d -maxdepth 1 -mindepth 1 -exec du -sh {} \;

grep "No such user (in reply to RCPT TO command);" /var/log/maillog | awk -F"[<>]" '/from/ || /to/ {print $4 "," $6 "\r\n"}' | awk '!($0 in a) {a[$0];print}'


No comments:

Post a Comment