337 reputation
419
bio website
location
age
visits member for 4 years, 4 months
seen Sep 30 at 1:14

Jun
5
comment How can I ensure that my static ip address is read from /etc/network/interfaces rather than dhcp?
Figured it out. I can't remember exactly the previous state I was in, but I can somewhat reproduce by calling sudo ip addr flush dev eth0; sudo dhclient eth0. Then I execute ifdown; ip addr flush dev eth0; ifup to load whatever static ip is set in /etc/network/interfaces.
Jun
5
comment How can I ensure that my static ip address is read from /etc/network/interfaces rather than dhcp?
Do you know how I can reproduce the issue I was having previously? I'd like to get back into the state I was in previously, where setting the static IP address had no effect so that I can be sure that this approach works.
Jul
17
comment git bash-completion on mac osx does not work following standard installation instructions
Changing terminal to run /opt/local/bin/bash resolved it. Can you tell me why this step is needed?
Sep
9
comment Reverse history search in bash followed by arrow keys causes cursor to display at the wrong location
Yet better: the problem seems to go away if the current line is redrawn. Either C-l to clear screen and redraw current line or creating a key binding for the unbound function redraw-current-line.
Sep
8
comment Reverse history search in bash followed by arrow keys causes cursor to display at the wrong location
A better solution than echo that I just found: Append a '#' to the beginning of the line rather than an echo. This way bash treats the whole line like a comment.
Sep
8
comment Reverse history search in bash followed by arrow keys causes cursor to display at the wrong location
Thanks, I actually tried that just a little while ago. In my case I was careless and blew away a file because there was a pipe in the command that swallowed the echo. You are correct, this seems to only affect long commands according to my experimentation.
Jul
19
comment Get a fixed dns for an ec2 instance
OK, I'll see if I can get this to work tomorrow, and yes, I save the instance. Everything is stored in EBS when the instance is stopped. The only question is whether I can run dyndns or something similar automatically I guess.
Jul
19
comment Get a fixed dns for an ec2 instance
Are you suggesting running dyndns from the instance? Is it possible to update the dns record from the instance automatically when it's started (sorry if this is a dumb question. I'm an ec2 n00b.)
Jul
8
comment Repetitive popup warning that my hard drive has problems in Fedora 15
I have two hard drives (I guess) sda and sdb, and have a dual boot machine (Windows/Fedora). How do I figure out which files are on which disk? I haven't booted into Windows in months and could tolerate bad sectors in that disk.
Jul
8
comment Set keyboard shortcuts that use the Windows key (Mod4) in Fedora 15?
What do you mean? I tried adding the shortcuts again, if that's what you mean.
May
26
comment Is there a way to expand bash history references such as `!:0-` before executing without using the p option?
I just saw that a common .bashrc binding is bind Space:magic-space. Seems to work well.
Apr
28
comment How can I fix a problem with standard error screwing up the output of watch?
Neither of these works for me. For example, if I run ps -ef | awk -F' ' '{print $2}', I get the pids for all processes. However, watch "ps -ef | awk -F' ' '{print $2}'" gives incorrect field extraction, and watch "ps -ef | awk -F\' \' \'{print $2}\'" leads to an unterminated command.
Apr
28
comment How can I fix a problem with standard error screwing up the output of watch?
Any suggestions for cases in which the command I want to pass to watch has quotes in it?
Apr
28
comment Overwrite the terminal output of a bash command that has multi-line output?
@Neal: Per an additional question I just asked, the fix for my problem is to add quotes around the jmap command so that its output is redirected rather than watch's: watch 'sudo jmap -heap 31945 2> /dev/null'
Apr
28
comment Overwrite the terminal output of a bash command that has multi-line output?
@Neal: piping through cat leads to the same problem.
Apr
28
comment Overwrite the terminal output of a bash command that has multi-line output?
It seems that there is some stderror output that may create this problem (I'm running watch sudo jmap -heap <pid>, which begins with four lines of stderror output). If I append 2> /dev/null to the command outside of watch, this strips the output. However, appending 2> /dev/null causes the output to be messed up and missing lines.
Apr
28
comment Overwrite the terminal output of a bash command that has multi-line output?
This looks like it should be what I want, but the output is screwed up. The first call to the command by watch produces good output, and then with each additional call the output becomes increasingly messed up. The alignment progressively worsens until I can't even read it anymore. EDIT: strangely, if I resize the terminal window the output is good again, but still continues to degrade with each passing call.
Apr
27
comment How to read one line from `tail -f` through a pipeline, and then terminate?
Thanks for the explanation. The second solution is what I needed, since only one line from tail -f would match.
Apr
22
comment Problem using `cut` with `tail -f`
Is there a way to force unbuffering with cut? Incidentally, I switched to using awk, and the buffering problem went away.
Mar
18
comment Copy chrome browser history from windows to linux?
I actually just tried this, and ran into some problems. Chrome wasn't quite behaving as expected (got some 'couldn't load profile' errors or something).