Posts Tagged unix

me sudo long time!

Feel like sudo is always asking your for ur password?

Add a line like this:

Defaults:YOU_USERNAME_GOES_HERE_DUDE timestamp_timeout=28800

to your /etc/sudoers and ride it all night long!


Leave a Comment

sum,avg,min,max with awk

awk ‘BEGIN{count=0;sum=0;min=0;max=0} {n=$1 ; if (0==count||nmax) max=n; count++; sum+=n;} END {printf( “min: %d\nmax: %d\nsum: %d\ncnt: %d\navg: %f\n”, min,max, sum,count, sum/count );}’

Leave a Comment