How Do I Make Linux / UNIX Filesystem Backup With dd?

November 15th, 2010 by upa_kid 
dd command is all in one tool to Copy a file, converting and formatting according to the options. Since Linux (and other UNIX versions) understand everything as a file dd works like wonders. Please note dd is not created specifically for a backup purpose but it is real handy tool. Few months back I was new to HP-UX and I was unable to understand the HP-UX tape devices then I used dd to create backup....

How do I run 32bit application under itanium (ia64) system running RedHat Linux?

November 15th, 2010 by upa_kid 
Well some time you do not have access to source code or you really do not want to compile the code. Then Red Hat Enterprise Linux provides the service called ia32el. The ia32el package contains IA-32 Execution Layer platform which allows emulation of IA-32 binaries on IA-64.(i.e. it allows to run 32-bit applications through the use of Intel’s IA-32 Execution Layer). The IA-32 Execution Layer...

How do I Read ext2 or ext3 filesystems under Windows 2000 or XP Desktop?

November 15th, 2010 by upa_kid 
Asked by Payal K. Q. I would like to know – can I access Linux ext3 partitions from windows 2000 server (dual boot) or windows XP desktop, as I have tons of MP3 and video files downloaded under Linux. A. It is true that you can easily access your Windows partitions from Linux. However with small free utility called Explore2fs you can easily access Linux ext3 or ext2 partitions too without any...

How do I Print Out a Linux man or info Page?

November 15th, 2010 by upa_kid 
Some time it is necessary to print a Linux man or info page. To print a ls command man page type the following command: $ man ls | col -b | lpr -P hp1_floor2 Where, * col -b : To format man page output, it will not show any special character such as backspaces * lpr -P hp1_floor2 : hp1_floor2 is the printer name of the Linux/UNIX printer queue To print the man page with effects such as italic...

I will show you mine if you show me yours – Displaying files

November 15th, 2010 by upa_kid 
Here is a little stuff from me for all UNIX/Linux users out there. What are your favorite ways to displaying files while working at shell prompt? Here is my list (according to task): Display text files * cat – Display text file ( don’t use, go for less) * less – Display text file, move forward or backward * head -Display top of the file * tail – Display bottom...

How do I Use Multiple Screens on One Terminal over ssh session?

November 15th, 2010 by upa_kid 
Most of the time GUI is not available on remote Linux system, you login over ssh and start to work, if you need to run two or three task at a time, you login over ssh two or three times. However, with screen windows manager utility you can run multiple terminals at the same time from single console login over ssh session (UNIX guru uses the term called multiplexing for this concept). Any seasoned...

HTTP 500 error when I run my Perl script

November 15th, 2010 by upa_kid 
At my work place, we provide shared hosting and http 500 error is the most common in trouble tickets. Although everything is properly configured we still get reports of error. Send MIME type 99% time – it was not servers fault at all. I found that the most common reason for HTTP 500 errors is not printing the MIME type before outputting data to the web browser. All you need following line before...

How do I forcefully unmount a Linux disk partition?

November 15th, 2010 by upa_kid 
It happens many times you try to unmount a disk partition or mounted CD/DVD disk and if you try to unmount device, which is accessed by other users, then you will get error umount: /xxx: device is busy. However, Linux/FreeBSD comes with fuser command to kill forcefully mounted partition. Understanding device error busy error What happens basically, is that Linux / UNIX will not allow you to unmount...

How do I find the exit status of a remote command executed via ssh?

November 15th, 2010 by upa_kid 
After writing about “Execute Commands on Multiple Linux or UNIX Servers”, I received couple of emails asking about “how to find out the exit status of a remote command executed via ssh command.” Well I never ever used exit status of a remote command executed via ssh. However, here is simple way to find out exit status: $ ssh user@ras.nixcraft.in date;echo $? Sun Feb 5 19:01:01...

Linux How do I display failed login attempt?

November 14th, 2010 by upa_kid 
/var/log/faillog is a log file for failed login attempts. This file maintains a count of login failures and the limits for each account. The file is fixed length record, indexed by numerical ID. Each record contains the count of login failures since the last successful login; the maximum number of failures before the account is disabled; the line the last login failure occurred on; and the date the...

How do I monitor Linux/BSD system over time without scrolling output?

November 14th, 2010 by upa_kid 
Suppose you would like to monitor memory utilization over time without having to look at scrolling output or disk space without scrolling output then normal commands do not provide any options. You need to use watch command, which execute a program periodically, showing output in fullscreen mode. It runs command repeatedly, displaying its output. This allows you to watch the program output change...

How do I monitor what my MySQL server is doing?

November 14th, 2010 by upa_kid 
To solve MySQL problems or to optimize MySQL server you need to use special tool called mytop. It is a UNIX top command clone for MySQL server. It updates every few seconds, so you can get a reasonable look at your SQL performance. It is capable of displaying a huge amount of information. Please note that it needs Perl and other CPAN package to run. If you are using Debian then just install it using...