1,303 reputation
313
bio website
location California
age
visits member for 2 years
seen Jul 18 at 5:09

Jun
26
awarded  Yearling
Jun
20
comment Using Perl to count the number of scientific numbers in a file
This would give incorrect results if a line happened to contain both a number and some other string. The answer above that uses grep's -o option to output only matches is more correct.
Jun
17
awarded  Nice Question
Apr
23
comment Is there an alternative to the `which` command?
If your shell or keyboard doesn't support "[]" (I think ash does), you can replace [ -x $dir/$COMMAND ] with test -x $dir/$COMMAND (test is a bash/ash built-in, and may also be available as a standalone executable
Apr
23
answered Is there an alternative to the `which` command?
Mar
29
awarded  Nice Answer
Mar
29
comment What is the best way to add a user to the sudoer group?
And, visudo only protects you from syntactical errors - it's still possible to lock yourself out of the system with a bad sudoers configuration. So, you should still know how to get root without sudo. I usually edit /etc/sudoers with vi instead of visudo, write the file, and test my sudo access before exiting vi. That way I can revert my changes if it doesn't work. This doesn't work with visudo since it edits a temp file. Though these days it's not much of an issue since nearly all of my servers are managed by Puppet, including the sudoers file.
Mar
29
comment ssh-copy-id hangs with 8192-bit key
For completeness, I tested with a 16384 bit key (the max key size for my version of ssh) and it worked fine too. Took a long time (5 minutes or so) to create that 16384 bit key and has a noticeable 2 or 3 second delay when authenticating to the remote host.
Mar
29
comment ssh-copy-id hangs with 8192-bit key
Works for me with an 8192 bit key and Linux client and server: OpenSSH_6.0p1 Debian-3ubuntu1.1, OpenSSL 1.0.1c 10 May 2012.
Mar
28
revised Sudoers for one day per week?
add comment about restrictng access to prod servers
Mar
28
answered Sudoers for one day per week?
Mar
28
comment Particular site is not working on Ubuntu 12.04
@Graeme - If an alternate DNS server solves his problem, he can edit the resolvconf config to hardcode the DNS server.
Mar
28
comment Particular site is not working on Ubuntu 12.04
@Graeme If he can resolve the name using an alternate DNS server, then the solution to his problem is clear. If he can't, then the search goes on.
Mar
28
comment Particular site is not working on Ubuntu 12.04
Maybe your ISP's nameserver is not resolving some domains for some reason. Some have noted that Comcast is silently blocking some domains from DNS resolution. Try running host developer.android.com to resolve with your default nameserver, then host developer.android.com 8.8.8.8 to resolve with a Google DNS server to see if it's a problem with your default DNS server.
Feb
18
comment awk + print awk output in one line
If he wants a newline after the last record, he could do: awk '/Shutdown/ {printf "%s ", $1} END {print ""}'
Oct
25
answered Accessing a different computer on the network
Oct
25
revised Cannot install rsync (unable to create…Input/output error)
fix typo
Oct
25
comment Cannot install rsync (unable to create…Input/output error)
Thanks, I added it as an answer. I didn't add it as an answer originally because I didn't think it would turn out to be something so obvious :)
Oct
25
answered Cannot install rsync (unable to create…Input/output error)
Oct
25
comment Performance Issue: AWS Medium Linux Instance V/S Hetzner Dedicated Instance
Since you're only seeing 11.5 seconds of CPU time being used over 22 minutes of real time, looks like the difference is in I/O speed. Which is surprising if you're using EBS storage since EBS is not particularly fast, but I think that even the instance store storage is backed by spinning hard drives so I'd expect your SSD's to be much faster.