Geerd Wilders: Enough is enough

Posted by root Fri, 28 Mar 2008 20:06:00 GMT

Posted in  | Tags  | 2 comments

Ruby system administration scripts

Posted by root Sat, 22 Mar 2008 18:45:00 GMT

OS users:
users = File.new("/etc/passwd").collect{|x| x.split(':')[0]}
Number of files in directory:
puts %x{ls}.split(/\n/).size
puts %x[ls|wc].split(/\s+/)[1]
Network interfaces:
inet = Hash.new{|h,k| h[k.split(/\s/)[0]] = k.scan(/addr:(\d+\.\d+\.\d+\.\d+)/)[0].to_s}

%x[ifconfig].to_s.split("\n\n").collect{|x| inet[x]}

# dump the structure: puts inet.inspect

to be continued….

Posted in ,  | Tags  | no comments

Management

Posted by root Sat, 22 Mar 2008 17:41:00 GMT

Tags  | no comments

Who am I?

Posted by root Mon, 10 Mar 2008 23:05:00 GMT

Tags ,  | no comments

Health

Posted by root Mon, 10 Mar 2008 20:22:00 GMT

Tags  | 2 comments