Brain Goo

Carpe Crap ‘em

Brain Goo header image 4

Entries Tagged as 'How Tos'

LVM Breaks When Upgrading Debian Etch to Lenny 4.x to 5.0

April 28th, 2009 · 4 Comments

Using the standard upgrade proceedures, Debian Etch + LVM will fail to upgrade to Debian Lenny gracefully.  This is due to the kernel modules and is simple to avoid. Before changing apt sources (They should be etch) apt-get update apt-get upgrade reboot if kernel upgrades Now change your apt sources  (Lenny or Stable) apt-get update [...]

[Read more →]

Tags: Debian · How Tos · LVM

PERL How To Print A List Without A Loop

February 6th, 2009 · No Comments

PERL has a built-in function called join() that will concatenate a list with a given string. The official perldoc states: join EXPR,LIST Joins the separate strings of LIST into a single string with fields separated by the value of EXPR, and returns that new string. Example: $rec = join(‘:’, $login,$passwd,$uid,$gid,$gcos,$home,$shell); From the code example, you [...]

[Read more →]

Tags: How Tos · Programming · Software · perl

SQL: Select duplicate rows, select indistinct rows

October 27th, 2008 · 1 Comment

Using SQL, MySQL or whatever your favorite database may be, we all know using SELECT DISTINCT will return unique values in case a value appears more than once in a table. How do you fine duplicates? What if I want to know where the duplicates are? The trick is to use count() and compare it [...]

[Read more →]

Tags: How Tos · SQL · mysql