Simple script to monitor Xen node utilization with email alert

Here is a simple script that utilizes xentop to monitor your Xen server. You can schedule this via cron to run every X minutes to track the load average and if gets too high, it will email you (be sure you change your-emailid to your actual email address) #!/bin/bash loadavg=`uptime | awk ‘{print $10}’` process=`nproc` … Read more

How to Find Files Owned by Group(s) in Linux

bash arguments, pass parameter, pass argument to script

Here is powerful and simple use for the Linux find command – finding files or folders by one or more groups. Let’s get right onto the examples: Find files by group students find -type f . -group students Find folders/directories by group students find -type d . -group students Find files by groups student and teachers find -type … Read more

How to Find Files Owned by Users(s) in Linux

bash arguments, pass parameter, pass argument to script

The find command in Linux/Unix is extremely powerful and can take some time to learn all of its uses. In previous articles, we have explained how to it to find files greater than or less than a certain size, find number of files in a folder, and finding the largest files on your computer. This article … Read more

Solution: incompatible implicit declaration of built-in function ‘bzero’

While using the bzero() function you may have run into the message warning: incompatible implicit declaration of built-in function ‘bzero’. The solution for this common, annoying, message is straightforward. Simply include the header file <string.h> and the warning will go away! What is bzero? bzero() is a function in C and C++ programming languages, commonly used in … Read more

Insert/Add String to Beginning of a File

bash arguments, pass parameter, pass argument to script

In a previous article, I showed you how to append a string to the end of file. Now I will show you how to insert a string to the beginning of a file in Linux. The solution is not as obvious as the former, but I will show you a quick and easy way using … Read more

Fetch error installing Java on Ubuntu 11.04. Solved!

I am running Ubuntu 11.04 and was trying to install the Java OpenJDK 6.0 (and 7.0) on my system but I received the following error: Unable to fetch some archives, maybe run apt-get update or try with –fix-missing? I tried installing several different Java packages but all of them failed with the same error. Finally, … Read more

How to install Ruby 1.8.7 on CentOS 5.5 Linux

ruby, php, java, python code

Have you tried doing yum install ruby in CentOS 5.5? If you have the default repositories configured, you will notice that it installs the ancient Ruby 1.8.5. Not ready to move up to Ruby 1.9, but would like to install Ruby 1.8.7 – well here is how to do it! Install Ruby 1.8.7 on CentOS … Read more

Linux – How to disable ‘Last Login’ welcome message

When you login (via SSH or other method), to a Linux box, you will see a Welcome message that displays your Last Login time and date as well as other general information regarding the system. Here is an example: Linux sp-ubuntu 2.6.35-24-generic #42-Ubuntu SMP Thu Dec 2 01:41:57 UTC 2010 i686 GNU/Linux Ubuntu 10.10 Welcome … Read more

4 Free Ways to Convert a PDF to a Plain Text File on Linux

In the vast landscape of digital content management, the need to convert PDF files to text is a common task for professionals, students, and casual users alike. PDFs are widely used for their portability and consistency across different platforms but aren’t as easy to edit or search as plain text files. Fortunately, for Linux users, … Read more

How to Create Thousands/Millions Files in Linux

bash, command-line, linux

Do you need an ultra fast way to create a large number of files in Linux? Perhaps, you are doing some load testing for an application and you need to create 1000 or even 1,000,000 files in the matter of seconds. Well, here is how to do it! There are two parts to creating these … Read more

Examples of Linux ‘head’ Command to Preview a File

linux, shell bash, ubuntu

This article will show you how to use the head command in Linux. head is used to print out the beginning of a file. For example, this is useful when you have a giant text file and you want to preview the contents without attempting to open the entire file. Here are some common examples … Read more

How to add a Windows/Linux network printer in Ubuntu 9.10

add a printer, install a printer, ubuntu, printer

This article will show you how to add a network printer on a Ubuntu 9.10 system. Let’s go ahead and get started… Navigate to System –> Administration –> Printing Then choose Server –> New –> Printer from the Printer configuration window The New Printer wizard will be displayed. Here you can add either local or … Read more

How to Kill All Processes in Linux with a Single Command

kill processes linux, stop script execution

Managing processes in Linux can sometimes feel overwhelming, especially when you need to terminate several processes at once. Whether you’re dealing with multiple instances of a script, a misbehaving application, or background jobs running wild, there’s a simple way to handle it all. In this guide, I’ll walk you through various methods to quickly kill … Read more

How to change screen/display resolution in Ubuntu 9.10

This article will show you how to change your monitor resolution in Ubuntu 9.10. Most of us are long-time Windows users and we are very used to the interface and how to do a simple task like this. But for Linux newbies, it can get frustrating to navigate all the menu options to find the … Read more

How to disable password prompts (UAC) in Ubuntu

This article will show you are to disable UAC (User Access Controls) aka those pesky popup dialogs where you must enter your password in Ubuntu Linux! As many of you know, this feature was implemented in Windows Vista but went horribly wrong and is the reason it has been removed in Windows 7. Linux, which … Read more

How to Install SSHD service on Ubuntu Linux in Seconds

The Secure Shell Daemon (SSHD) is a critical service for Linux users and administrators, providing a secure method to access remote machines over an insecure network. This service encrypts the connection between the client and the server, ensuring that sensitive information, such as passwords and user data, is transmitted securely. This comprehensive guide will walk … Read more

How to compare 2 files using ‘diff’ in Linux

This article will introduce you to the diff command on Linux which is used to compare two files and display the “differences” between the two. I will also provide you with a Bash shell script to compare two files and simply output if they are the same or not. Lets begin with the basic usage … Read more

How to Generate MD5 Checksums and Validate a File in Linux [2024]

md5 checksum linux, create md5, md5 checksum

This article will explain how to generate a MD5 Checksum on a file or list of files on Linux and how to validate a file against a known checksum. We’ll give you easy-to-follow examples as well as explanations. Let’s get started! What is a MD5 Checksum? The MD5 checksum is a widely used cryptographic hash … Read more

How to Open & Uncompress a .tar.bz2 File

In the digital world, file compression is a fundamental technique to reduce file sizes for storage efficiency and faster transmission. Among various compression formats, the .tar.bz2 format stands out for its high compression ratio, especially useful for packaging a collection of files or directories into a single file. This guide delves into the process of … Read more

How to install a FTP server on Linux in 30 seconds

FTP (File Transfer Protocol) servers are a fundamental aspect of data exchange in networked systems. Particularly on Linux, an open-source platform known for its robustness and adaptability, FTP servers serve as powerful tools for managing and transferring files across network connections. From software development to web hosting, FTP servers allow users to upload, download, and … Read more

Linux 101: Append String/Data To A File

rpm dependencies, linux, ubuntu

Appending data to a file is one of the most basic yet useful tasks in Linux, especially for system admins and developers. Whether you’re working on scripts, logs, or just need to add some text to an existing file, Linux offers several straightforward ways to do this. Here, we’ll walk through five methods you can … Read more

Beginner’s guide to RPM installation on Linux

install rpm linux, ubuntu

This guide will take you through the basics of RPM and show you how to install it on different Linux server distributions: Ubuntu, CentOS, Fedora, and Red Hat Enterprise Linux (RHEL). In the world of Linux, mastering the art of installing, upgrading, and removing software packages is crucial. These tasks are generally handled by what’s … Read more

How to List All Installed RPM Packages in Linux

bash, command-line, linux

This article will show you to how to list of all installed RPM packages on Linux distributions like Ubuntu, CentOS, RHEL, and Fedora. We’ll show you how to solve this using the rpm and dpkg commands. RPM (Red Hat Package Manager) is used by distributions such as CentOS, RHEL, and Fedora for package management. Ubuntu, … Read more