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: Unix

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...

Changing Veritas device owner for raw device

Today I had to set the owner/group for a Veritas raw device. You can set it on Unix using chown, but the settings will be lost after a reboot. To properly set the ownership on a veritas raw device you need the following command: vxedit set user=username group =groupname...

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)

Setting your X environment

Most Unix sysadmins are hardcore Command Line gurus. However, sometimes you may need to run a graphical application on Unix. The graphical environment on Unix is called the X Window System (or X or X11). Unlike most other graphical systems, X is designed to be used over the network. ...

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)

Solaris: Determinate to which package a file belongs

I had an issue with software which was complaining about the version of /usr/lib/libCstd.so.1 So I wanted to know to which package this particular file belongs, in order to see if there are any updates available for this package. Here's how to do it:   (More)

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