rigadicomando.org

Whatever you can cat

Random Quote

The Tao is like a bellows:
it is empty yet infinitely capable.
The more you use it, the more it produces;
the more you talk of it, the less you understand.

• Lao Tzu

Secondary links

  • About
  • Contacts
  • Disclaimer

Blogs

Quick System Backup via Netcat

Submitted by admin on Tue, 2008-09-23 15:18.
  • bash
  • scripts

Sometimes a backup is needed but the server storage is not enough, in this case you must backup your data on the fly via the net, without the facility of storing locally and then transfer the data.

There are many methods to backup your data on the fly, using rsync via ssh is one for example, but this post is about using netcat for a quick solution.

Listening side, where the backup data will be stored, or destination:

~# mkdir /whatever_the_name_of_your_backup_dir
~# cd !$
~# netcat -l -p 12345 | pv | tar xjf -

Sending side, where the original data are, or source:

~# cd /
~# tar cjf - --ignore-failed-read bin boot cdrom dev/ etc/ home/ initrd* lib/ root/ sbin/ usr/ var/ vmlinuz*  | pv | netcat -q 2 <YOUR_DESTINATION_IP> 12345

Don't forget to create: /bin /media /mnt /opt /proc /selinux /srv /sys /tmp
and chmod 1777 /tmp
(This FHS is for a Debian Etch, please take care of different directories in your setup)

  • admin's blog

eucalyptus logs

Submitted by admin on Tue, 2008-08-12 10:14.

> Hello Fabio,
>

  • admin's blog
  • Read more

Column width in bash environment

Submitted by admin on Sat, 2008-03-29 22:42.
  • bash
  • Debian GNU/Linux OS

export COLUMNS=150

  • admin's blog

USB Stick GNU/Linux mini howto with Fix for "Boot error" Buggy BIOSes

Submitted by admin on Wed, 2008-03-05 23:50.
  • Debian GNU/Linux OS
  • howto

I was reading some articles around the web about how building your persistent GNU/Linux system on usb stick, I found many howtos but I had problems with my BIOS.

It seems that certain versions of Award BIOS, one of the major BIOS vendor, are Buggy and misbehave with syslinux, to fix this you should give a USB-ZIP drive compatible geometry to the USB Stick. I found this useful info into the documentation inside the syslinux tarball (doc/usbkey.doc).

  • admin's blog
  • Read more

Clear the whole Postfix mail queue

Submitted by admin on Fri, 2008-02-22 15:07.
  • bash

~# for i in `mailq|grep '@' |awk {'print $1'}|grep -v '@'`; do postsuper -d $i ; done

Thomas Sewell from coolsewell.com contributed with this helpful notes:

  • admin's blog
  • Read more

Split big files for editing

Submitted by admin on Tue, 2008-01-15 14:13.
  • bash
  • emacs

If you need to edit a big file, for example a mysql full dump for recover a single database, and your editor, for example emacs, say
something like "Maximum buffer size exceeded" you can split it in many smaller files.

~$ split -b 100m ORIGINAL_BIG_FILE OUTPUT_FILE_NAME

Output files will be:

OUTPUT_FILE_NAMEaa
OUTPUT_FILE_NAMEab
OUTPUT_FILE_NAMEac

and on ... every one 100MB weight.

Then you can edit and just keep your DB for restore.

  • admin's blog
  • Read more

IBM releases 9th article - and provides support for DB2 Express-C

Submitted by admin on Fri, 2006-10-20 07:50.

http://www-128.ibm.com/developerworks/ibm/osource/index.html

  • admin's blog

On Drupal 4.7.2!

Submitted by admin on Fri, 2006-06-23 16:01.
  • administrivia

The site is online with the new 4.7 Drupal version :)

  • admin's blog

How do you rename files with a certain pattern in bash?

Submitted by admin on Mon, 2006-05-29 09:25.
  • bash
  • scripts

How do you rename files with a certain pattern in bash?

for i in *ABC*
do
new=$ ( echo $i | sed ’s/ABC/DEF/’ )
mv $i $new
done

Thanks Live from Yokohama

  • admin's blog

Creating and using Qemu for a virtual OS Installation

Submitted by admin on Mon, 2006-05-22 14:20.
  • Debian GNU/Linux OS

Create qemu virtual image file:

qemu-img create virt1 1G

On my laptop for some reasons, no cdrom boot was allowed for the virtual installation,
so the loopback device comes useful to do the installation:
dd if=/dev/cdrom of=sarge-netinst.iso

Now boot the new OS installation (I use Debian GNU/Linux for both real and virtual systems)
qemu virt1 -boot d -cdrom sarge-netinst.iso

Then boot the new system (root or sudoed, as you need root privileges for routing)

qemu virt1 -boot c -n /etc/qemu-ifup

  • admin's blog
  • Read more

A Grand Unified Theory of YouTube and MySpace (from Slashdot)

Submitted by admin on Thu, 2006-05-11 14:30.
  • web

Ant writes "Paul Boutin's Slate article explains the factors contributing to the success YouTube and MySpace: they are easy to use (usability), and they don't 'tell you what to do.'" From the article: "Both YouTube and MySpace fit the textbook definition of Web 2.0, that hypothetical next-generation Internet where people contribute as easily as they consume.

  • admin's blog
  • Read more

Print all ANSI colors

Submitted by admin on Mon, 2006-05-08 07:59.
  • bash
  • scripts

(from http://wiki.splitbrain.org/shellsnippets)

for i in 30 31 32 33 34 35 36 37 39
do
for j in 40 41 42 43 44 45 46 47 49
do
   # skip if same fore- and backgroundcolor
   if [ $j -eq $[ i + 10 ] ]; then
     continue
   fi
   echo -e $i $j "\033[${i};${j}mCOLOR\033[0m"
done
done

  • admin's blog

Simple bash calculator

Submitted by admin on Mon, 2006-05-08 07:50.
  • bash

Put the following little snippet in your .bashrc/.bash_profile and you'll have a handy little calculator:

? () { echo "$*" | bc -l; }

Use like this:

bash$ ? 2*2
4

Thanks textsnippets.com

  • admin's blog

How to list duplicate lines in a text file, with counts next to each unique line

Submitted by admin on Mon, 2006-05-08 07:40.
  • bash
  • scripts

from:

How to list duplicate lines in a text file, with counts next to each unique line - [spugbrap's random notes geek blog] [del.icio.us (bash)]

At some point, last year (it's been in my 'toblog' file all this time), I needed to analyze the lines in a text file, removing duplicate lines, while counting how many times each duplicated line occurred within the file, and sorting from most common to least common.

  • admin's blog
  • Read more

Unlimited Loop

Submitted by fabio on Fri, 2006-02-10 14:22.
  • bash

Generate an infinite loop in the shell

while true ; do date ; sleep 5 ; done

  • fabio's blog
12next ›last »

tags in Arguments

administrivia bash Debian GNU/Linux OS emacs howto perl scripts web
more tags

Navigation

  • Feedback
  • News aggregator

ICT users' rights

  • Support freedom by joining the FSF during our year-end fundraiser
  • Bilski ruling: a victory on the path to ending software patents
  • FSF Releases New Version of GNU Free Documentation License
  • FSF reboots its High Priority list with a grant and call for input
  • "Avoiding Ruinous Compromises" by Richard Stallman
more

High Scalability Architecture

  • Scalability Perspectives #2: Van Jacobson – Content-Centric Networking
  • What CDN would you recommend?
  • Is Eucalyptus ready to be your private cloud?
  • Private/Public Cloud
  • Useful Cloud Computing Blogs
more

Debian Security

  • DSA-1667 python2.4
  • DSA-1666 libxml2
  • DSA-1665 libcdaudio
  • DSA-1664 ekg
  • DSA-1663 net-snmp
more

Drupal Security

  • SA-2008-069 - CCK for 5.x and 6.x - XSS vulnerabilities
  • SA-2008-068 - Localization client and Localization server - Cross site request forgery
  • SA-2008-067 - Drupal core - Multiple vulnerabilities
  • SA-2008-066 - Shindig-Integrator - Multiple vulnerabilities
  • SA-2008-065 - Node Clone - Access bypass
more

EFF

  • FBI Withdraws Unconstitutional National Security Letter After ACLU and EFF Challenge
  • EFF and Sheppard Mullin Defend Wikipedia in Defamation Case
  • Congress Must Investigate Electronic Searches at U.S. Borders
  • Betrayed MSN Music Customers Deserve More from Microsoft
  • EFF Report: FBI Slowed Terror Investigation with Improper NSL Request
more

Invent Geek

  • the ion cooler 2.0
  • the ultimate dance pad v1.0
  • thermaltake sponsors inventgeek
  • The Thermaltake MiniFridge Case Mod
  • Inventgeek gets a facelift and a butt tuck
more

 Privacy | Disclaimer | Drupal | Creative Commons

All content on this site is ditributed under Creative Commons License, each individual author is responsible for its own posts.

RoopleTheme