4,957 reputation
11424
bio website mikelward.com
location Mountain View, CA
age 33
visits member for 4 years, 8 months
seen Jul 10 at 22:33

Computer guy from Australia now living in the US.

Part sysadmin, part developer, part web developer.

My name is pronounced like "Michael".


Feb
23
comment Kill xserver from command line (init 3/5 does not work)
OP didn't mention which distribution or operating system. What am I supposed to do?
Feb
22
comment Go away “Visual Studio 2008 Command Prompt”. Give me my regular command prompt
@cyberkiwi: where.exe is in C:\Windows\System32 on my Win7 system. Maybe XP doesn't have it?
Feb
22
comment Go away “Visual Studio 2008 Command Prompt”. Give me my regular command prompt
@Steve Fallows: So run C:\Windows\System32\cmd.exe and run where inside that command prompt window instead.
Feb
21
comment Difference in utf-8 conversion for multibyte characters
TextPad probably isn't detecting that the file converted using iconv is encoded in UTF-8.
Feb
21
comment Rsync Grabing Only New Files
@steven Yes indeed. Thanks. Fixed.
Feb
20
comment Invoking mercurial commands for all directories in a given directory
Remove the quotes.
Feb
20
comment Generating SSH id_dsa.pub, but then I cannot find in SSH directory
Can you paste the exact commands you used and the output into your question? Please indent each line by 4 spaces so that it is formatted correctly.
Feb
14
comment Complex (?) Unix Text Replace Command
So the first half is printing out a list of files that contain AAA. Then we use xargs to do something with each file. In this case, run sed, replacing the first occurrence of BBB with CCC. If all occurrences need to be replaced, put a g after the last /.
Feb
14
comment Complex (?) Unix Text Replace Command
Sure. grep -R PATTERN DIR means grep all files in DIR, recursively. Normally it prints the lines that match PATTERN, but the -l option means only print matching filenames...
Feb
13
comment Export NFS path containing “-” (dash)
I have confirmed this in the source code. You should install nfs-kernel-server. Please see my answer for details.
Feb
13
comment Export NFS path containing “-” (dash)
What system are you on? My guess is that you can backslash escape it using the Linux nfs-kernel-server, but not the Linux nfs-user-server.
Feb
13
comment ghc6 install trouble: hGetContents: invalid argument (invalid UTF-8 byte sequence)
What does iconv -f utf-8 -t utf-8 >/dev/null /home/opm/.ghc/i386-linux-6.12.1/package.conf.d/unix-compat-0.2-edefa7bced91ebe6‌​10d455bab466e200.conf say?
Feb
12
comment Removing linked soft link in Unix
rm -rf A only removes A, not B.
Feb
11
comment How do you determine the actual command that is piping into you?
@akira Thanks. It took a few attempts to make it clean and portable. Learned a few things about procfs and lsof along the way. Thanks for the idea.
Feb
11
comment How to kill all the processes that have dates older than today?
Than today, or more than 24 hours old?
Feb
10
comment How do I get Apache to follow symlinks?
Whenever you get an error and are asking for help, you should provide the exact error message to us. And there will be clues in /var/log/apache2/error.log.
Feb
10
comment How do I get Apache to follow symlinks?
Yes. What error message do you see? You will need to do sudo chmod ugo+x /root; sudo chmod ugo+rx /root/mydir to make it work, and that's probably not a good idea. Better to move the files somewhere under /var/www if you can.
Feb
9
comment Automating the “sudo su - user” command
Try using expect. man expect for details.
Feb
9
comment Bash - array element exists
The problem was the missing spaces in [ $i=$action ]. Every part between [ and ] needs to be separated by spaces, because [ is a command that takes three arguments when using =.
Feb
9
comment Bash - array element exists
Hang on. [ $i=$action ] needs to have spaces like this: [ $i = $action ]. Your original post had spaces.