Linux / Unix Tips and Tricks

This blog contains Linux / Unix Tips and Tricks, collected during my work as a Unix System Administrator.
They are here for my own reference, but they might help you as well !

Category: Linux

Using rsync to synchronize a filesystem

Here's the command that I use to synchronize a filesystem from one server to another: rsync -avx --numeric-ids --progress --delete 10.0.0.1:/mnt/sda1/ /mnt/sda1/ The -a option sets “archive mode”, which essentially turns on a number of rsync options that preserve...

Perl: how to install a Perl module locally

Today I wanted to install a Perl module in my home directory. Here's how to do it:  (More)

VMware Server: Managing virtual machines from the command line

Sometimes it's handy to be able to manage your Virtual Machines on the Command Line. So if you are stuck in traffic and only have an SSH login available on your mobile phone, here are the commands to manage your Virtual Machine: Listing configured Virtual Machines: $...

Replacing text in multiple files

Here's a perl oneliner that does text search & replace over multiple files. Make sure you create a backup before using it !   (More)

Linux: How to extract a single file from a RPM package

I once got myself in the situation where I had no option but to retrieve a missing file from a rpm package. I didn't want to install the whole rpm, but only extract the missing file. Here's an example how to extract the original httpd.conf from the httpd package:  (More)

fsck: Filesystem has unsupported features

Last month I have migrated several physical Linux servers to VMWare using this excellent howto: Virtualize a Server with Minimal Downtime After migrating an old RedHat 9 server to VMWare, I got an error saying fsck.ext3: Filesystem has unsupported features . This is because RedHat...

How do I copy data from one system to another

Suppose you want to copy a directory structure from one machine to the other. You could create an archive (using tar or cpio), copy over the archive and extract it. But there's a better way to do it by combining tar and ssh.   (More)
 
Accessible and Valid XHTML 1.0 Strict and CSS
Powered by LifeType - Design by BalearWeb