
grep -c 'Jun/2003' access
grep -c `date +%b` access
grep -c `date +%d/%b` access
grep -c `date +%d/` access
zgrep -c `date +%d/` access_062003.gz
grep `date +%b/` access | gzip -c > access_01-20jul.gz
grep -c '^From:' /var/spool/mail/penguin
From: fred@tidlywinks.con
grep '[0-9]{3}-[0-9]{4}' inbox grep bash$ /etc/passwd
root:x:0:0:root:/root:/bin/bash
ps uax | grep $USER
ps -l | grep Oct
ps uax | awk '/mike/'
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
ps uax | awk '/root/ {print $1,$2,$4}' root 1 0.3
ps uax | awk '/3513/ {print $1,$2,$4,$11} root 3513 7.6 /usr/X11R6/bin/X
ps uax | awk '/^mike/ { x += $4 } END { print "total memory: " x }' total memory: 46.8
ls -l | awk '/jpg/ { x += $5 } END { print "total bytes: " x }' mail **Never logged in**
lastlog | sed '/Never/d' > last_logins
Username Port From Latest
cat last_logins | sed 's/08/07/g' > last_logins2
sed '/fred/s/08/07/g'
cat access | sed '/default.ida/!d; //Jul/!d' > MS_Exploits_July
cat access | sed '/^.{200}/d' > normal_traffic cat access | sed -n '/^.{220}/p' > MS_exploits echo `date +%y-%m-%d_AT_%T` No changes >> sleep_experiment_43B
echo `date +%y-%m-%d_AT_%T` subject moved right arm >> sleep_experiment_43B
03-08-09_AT_23:10:16 No change
uniq -f 1 sleep_experiment_43B
03-08-09_AT_23:10:16 No change
lastlog | uniq -f 4
chocolate
sort grocery_list
chocolate aisle 3
sort +2 grocery_list
bread aisle 1
cat /var/log/mail.log | sort -r |more
cat access | cut -c1-16 > IP_visitors
cat /etc/passwd | grep bob | cut -f1,3 -d":"
bob:1010
cat access | cut -f1-2 -d" " | sort | uniq | wc -l