1,330 reputation
522
bio website localhost
location San Francisco, CA
age 39
visits member for 3 years
seen 2 days ago

Research Computing Architect at the University of California, Berkeley


Dec
15
comment Removing port forwardings programmatically on a ControlMaster SSH session
Why don't you trust the Ubuntu updater? I have consistently good experiences with it. I think it's a good idea to do a fresh re-install anyway so then you get the advantage of doing an LVM-based install in 12.10 which is a good thing.
Dec
15
comment Removing port forwardings programmatically on a ControlMaster SSH session
Yes, you're right it's only available in version 6.0p1 and above. I assume you're using Mac OS X, in which case you can get the newer version with macports. I'll update my answer with the info.
Dec
2
comment OpenLDAP mirror mode replication failing with TLS behind a load balancer
Can you make your full configuration available via a gist so people can try to reproduce the problem?
Oct
31
comment How do I ask apt-get to skip any interactive post-install configuration steps?
If you're using sudo the export of the environment variable won't work, but you can do it this way: sudo DEBIAN_FRONTEND=noninteractive apt-get -y [packagename]
Oct
31
comment How do I ask apt-get to skip all post-install configuration steps?
If you're using sudo the export of the environment variable won't work, but you can do it this way: sudo DEBIAN_FRONTEND=noninteractive apt-get -y [packagename]
Oct
16
comment How to disconnect from lxc-console
@ElYobo No, lxc-console does not actually use screen, it just has similar behavior and by default actually uses a key that conflicts with screen's as described here.
Jul
8
comment My server is running out of memory, despite having all swap free
What program are you running that throws this error? If we can run apt-get source packagename to look at the source code, that might help solve the problem. How much memory is it trying to allocate and is it forking, using threads, etc?
Mar
19
comment Lightweight alternative to R for RHEL?
It would be more helpful to provide an example in any or all of those languages.
Mar
19
comment Lightweight alternative to R for RHEL?
hehe... don't you mean for the pain of it!? awk, for the masochist in you! :P
Mar
6
comment SSH X11 not working
-nolisten has nothing to do with this problem. As far as X is concerned it knows nothing about your remote ssh connection. To X it looks like any other local program.
Mar
6
comment SSH X11 not working
I added a new UPDATED section asking for more info to help debug this further.
Mar
6
comment Resetting SP password using jumper P20 doesn't work on Sun Fire x4600 M2
@JourneymanGeek Surely it could be worse... s/Sun/Oracle/g
Feb
28
comment Sort a list of domain names (FQDNs) starting from tld and working left
Do you have timing information for this sort? I'm curious to see how this compares to @Mark-Henderson's PowerShell implementation, as well as my Python implementation. I used /usr/bin/time -v for the elapsed time and max memory stats.
Feb
28
comment Sort a list of domain names (FQDNs) starting from tld and working left
5 seconds seems like a long time for only 1,500 lines. My python implementation does 1,500 in a fraction of a second, and 150,000 in just over 3 seconds. What do you suppose makes it so slow in PowerShell?
Feb
26
comment How do I prevent accidental rm -rf /*?
My intent is to provide a safe, general, effective, extensible answer to the original question: "How do I prevent accidental rm -rf /*?" Using find . -delete is safe(r) because it avoids this very common accidental mistake. It is also safer because makes it easy to preview the file list before deleting. It is a general method that works on any unix system and is not shell-dependent. It is effective because it accomplishes the same thing as rm -rf ./* but is more extensible, for example adding `-iname '*~' makes it easy to delete all *~ files in all subdirectories. How would rm do that?
Feb
26
comment How do I prevent accidental rm -rf /*?
Sure, so BSD find doesn't allow you to omit the directory, so you have find . -delete instead of find -delete. Also, the '*' glob may or may not expand dot files... it depends on a setting, which by default matches the behavior you describe, but if the system or someone has set shopt -s dotglob then it will expand dot files, too. If you are actually dealing with thousands of files you may also run up against the "Argument list too long" error, but that's another one you can avoid by using find.
Feb
26
comment How do I prevent accidental rm -rf /*?
It's clear you don't preview a list of files in your solution... that is exactly the point I'm making with find that you can do that easily simply by leaving off the -delete.
Feb
26
comment How do I prevent accidental rm -rf /*?
How is find -delete or find dir -delete a significant change in workflow? It accomplishes exactly the same thing as rm -rf ./* and 'rm -rf dir/*` without being prone to globbing errors or needing rubegoldberg-esque functions defined in .profile, plus if you want to preview the list of files before you delete them, just remove the -delete from the find command.
Feb
26
comment How do I prevent accidental rm -rf /*?
I understand what you are trying to do with set -f which is equivalently set -o noglob in Bash, but that still doesn't explain your statement that "The good thing about it is that it's only Bash". Instead you can eliminate the problem entirely and in a generic way for any shell by not using rm at all, but rather using the find command. Have you actually tried that suggestion to see how it compares with what you suggest here?
Feb
26
comment How do I prevent accidental rm -rf /*?
@ValentinNemcev Doing an accidental rm -rf /* is an age-old Unix rite of passage! Now it's time for you to learn the find command to save yourself from this kind of grief in the future. Certainly you should avoid some of the bad advice that is found in the answers to this question. Suggestions such as using specially-named -i file are akin to telling a kid learning to ride a bike to never pedal, just push on the ground with your feet, oh and also make sure to hold in the brake lever all the time. If you want to ride with the big boys, use find.