Instant Classic.
I'm pretty sure this is the most creative video I've seen all year. Prove me wrong!
I'm pretty sure this is the most creative video I've seen all year. Prove me wrong!
I’d love to go into detail about how I hacked together this awesome way to install wubi from the loopback mount onto it’s own partition. Truth be told, save for a quick boot loader edit, I did almost nothing.
Take a look at this site: http://lubi.sourceforge.net/lvpm.html for a complete, visual step-by-step on how to install your wubi instance directly to your hard drive.
The only issue I ran into was with booting into Parted Magic. The DEB I was instructed to install pointed at the wrong disk for root() in the GRUB line. It was as easy as editing /boot/grub/menu.lst to point it at the right place.
In /boot/grub/menu.lst search for ubninit. Change the root line above where you landed to look like this:
root(hd0,)
Rather than this:
root(hd1,)
Enjoy!
Today I had to yank a line from my ~/.ssh/known_hosts file on my jump box here at the office and I noticed that I had a lot of known hosts! I’d be interested to see how many you have.
My work jump box:
bsmith@ops654 [09:06:04 (0.00)] ~/.ssh -> wc -l known_hosts 1155 known_hosts
My desktop:
AGCOM\bsmith@bsmith-laptop [09:07:21 (0.22)] ~/.ssh -> wc -l known_hosts 65 known_hosts
Here is a fun command we use at the office that makes extracting hardware info from a remote machine easy as pie. It’s called dmidecode and it can be quite useful. Here is one section of the information it can provide, extracted from one of my servers(some bits removed):
Handle 0x0100
DMI type 1, 27 bytes.
System Information
Manufacturer: Dell Inc.
Product Name: PowerEdge 1950
Version: Not Specified
Serial Number: XXXXXX
UUID: XXXXXXXXXXXXXXXXXXXX
Wake-up Type: Power SwitchYou are, unfortunately, at the mercy of the hardware manufacturer for accuracy of the hardware information, but thus far I’ve found it to be accurate.
Enjoy.
I recently decided that I needed to come up with a system for managing custom and commonly used python modules. In doing so I decided upon a directory structure similar to this:
volatile/ dev/ prod/
Where volatile would be an unsafe set of packages, not yet tested in a staging environment (constantly updated), dev would be the packages currently in the staging environment and prod would be the packages currently installed, or ready to deploy to the production environment. This has been done before, nothing new. Along the way I thought to myself, how can I conserve disk space, avoiding up to three copies of the same file? An easy and logical way to avoid this would be hard links. So, rather than having three copies of a file that gets approved through to production, I would hardlink back to the original. I will demand that new files into volatile be uniquely named, so avoid overwriting. As files become obsolete, they will be pruned down the line (a system to handle this would need to be developed).
SO! Now that we got passed the background, too the yummy tips.
I have this awesome directory structure of existing files, right? How do I duplicate it creating links instead of files, and creating the directories as needed(can’t safely hardlink directories). I knew I could use rsync with --link-dest. It would look something like this:
rsync -avz --link-dest /volatile /dev/ \ rsync -avz --link-dest /volatile /prod/
-a says to preserve things, -v is verbose, -z says compress and --link-dest says to make links of the destination files.
I also thought of some find/exec magic creating directories and linking files, it would look something like this:
cd /volatile; find . -type d -exec mkdir -p /dev/{} \; \
find . type f -exec ln {} /dev/{} \;Repeating the same thing for the /prod/ directory.
Both the above solutions feel hackish, but would work. I thought, there has to be a simpler way, this is a fairly routine operation. After checking out google, I was pointed to the cp(1) man page, which uncovered this gem:
-l, --link
link files instead of copyingWoah, I knew it. So much shorter and uses the right tool for the job!
cp -r -l volatile/* dev/; cp -r -l volatile/* prod/
It’s amazing what you’ll uncover with a tad bit of googling and man page searching!
Nothing really exciting to report on day 3. I'm pretty sure I got this licked. I did discover that our Cisco VPN tunnel for clients was borked with the last maintenance on the network, so I lost my backdoor to be able to work from home via Linux :(.
Day 4 I found a reliable way to crash the Evolution "exchange backend". I get mails from Mailman mailing lists as they come in, rather than a daily digest. Clicking on one with the preview pane on will break the "exchange backend" causing me to have to restart the client. This happens after browsing around in "non-list" mails.
Also on day 4 I found myself needing a proprietary piece of client software to access a file server that I manage. I was slightly discouraged until I realized it was written in Java. I then discovered that they don't provide the source, but they do provide the jar files, and an RPM. I then used alien to convert the rpm to a deb, and I was well on my way to managing that file server.
I'm loving this!
Yesterday was my second day running Linux exclusively at the office. Everything is going smooth, I just wish that Evolution was a bit more stable.
Jumped a couple hurdles yesterday as well. I finally figured out the Global Catalog server so I can have our Global Address List via Evolution. I also tweaked OO.org so it would perform better. Follow instructions found here to speed it up!
So far today, no issues.
I’ve decided to run Linux via Wubi on my work Laptop for one week to try and work out any bugs/issues that might come about. So far I’ve had great success! I’m also building a case to present to our management requesting that whoever wants, should be allowed to run Linux. We won’t request software support from Internal IT, only hardware. Give us hardware, we do the rest. We would be in charge of our own desktop support. We’re smart guys here that have many years of Linux experience, I’m sure we can handle it :). I have a page setup on our internal wiki documenting my progress and counter-arguments for reasons they might say no. Wish me luck!
Here is my progress thus far in no order:
So I submitted a post to perlmonks RE: all the 'history meme' brouhaha. I provided two one liners in Perl (Below) and asked for people to improve/shorten/spice up the 'history meme' via Perl. We'll see how that goes :).
So, here's what I gave them to start with:
history | perl -le 'while($l = <>)
{$n=${[split(/s+/,$l)]}[2];$h{$n}++;} $i=0;foreach $k
(reverse sort {$h{$a}<=>$h{$b}} keys %h) {last if $i > 9; print "$h{$k} $k"; $i++;}'history | perl -le 'while($l = <>) ;
{$n=${[split(/s+/,$l)]}[2];$h{$n}++;} $i=0;@a=reverse
sort {$h{$a}<=>$h{$b}} keys %h; print "$h{$a[$_]} $a[$_]" for (0..9)'Matt showed up in my reader with this which I discovered is quite noisey on the intertubes right now. Here's my top ten.. Explanation below.
bsmith@ops654 [02:04:47 (0.00)] ~
-> history|awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}'|sort -rn|head
225 winto
82 ls
70 ssh
66 vi
65 checkuus
64 mssh
54 dig
53 cd
50 ping
41 cat
winto is a wrapper for screen that does this: screen -t $1 ssh $1.