Author: Rahul

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

xargs is a Linux/Unix powerful command to build and execute command lines from standard input. It takes output of a command and pass it as argument of another command. xargs takes standard input, delimited by blanks or newlines, and executes the command one or more times with any arguments followed by items. Blank lines on the standard input are ignored. Syntax xargs [OPTION]… COMMAND [INITIAL-ARGS]… Here the COMMAND is executed with arguments INITIAL-ARGS and more arguments read from the input. xargs Command Options The xargs commands provides a limited number of command line arguments but enough to utilize its features.…

Read More

Fsniper is a useful tool for directory monitor, and execute predefined actions on files created or modified in that directory. For example, if we want to make a backup of each files created in your web upload folder or ftp directory, Using fsniper we can copy all files created in that folder to backup disk. Fsniper uses inotify to watch for when a file is closed after being written to. Step 1: Install Required Packages First install the required packages for fsniper installation on your system. # yum install file-libs file-devel pcre pcre-devel Step 2: Download Fsniper Source Download the…

Read More

wget is Linux command line utility. wget is widely used for downloading files from Linux command line. There are many options available to download a file from remote server. wget works same as open url in browser window. Tip 1: Download File using Wget Below example will download file from server to current local directory. $ wget https://tecadmin.net/file.zip Tip 2: Download File & Save to Specific Location Below command will download zip file in /opt folder with name file.zip. -O is used for specify destination folder # wget https://tecadmin.net/file.zip -O /opt/file.zip Tip 3: Download File from FTP Some time you…

Read More

What is Checken/Egg Problem. Chicken/Egg problem occurred in booting process of Linux. A Linux kernel required modules to mount root partition which typically uses ext3 file system, LVM, RAID, etc. All the Linux modules resides in /var/lib/($uname -r) directory but Linux kernel could not access them without mounting it. So the problem was that how Linux kernel access modules required to mount root partition. How Linux Kernel Get it Solve The grub boot loader and Linux kernel works together to get solve this problem using Initial Ram Disk ( initrd ), which is part of GRUB specification for a Linux…

Read More

Optimize your Java development and runtime environment with this comprehensive guide on installing Java Development Kit (JDK) and Java Runtime Environment (JRE) on Linux systems. Java developers need both JDK and JRE to craft and run Java applications and applets efficiently. JDK offers the essential tools for developing Java applications, including the Java compiler, while JRE provides a runtime environment necessary for Java applications. How to Install Java on Ubuntu and Linux Mint This guide simplifies the process of installing OpenJDK Java on popular Linux distributions such as Ubuntu and Linux Mint. OpenJDK, an open-source implementation of the Java Platform,…

Read More

.htaccess stands for “hypertext access”. This is the default Apache directory level configuration file. .htaccess can be used to secure a particular directories in web server. One of the most common uses is to require user authentication in order to serve certain web pages. Create .htaccess File. First create a .htaccess file in your website document root to protect entire site or in specific directory and add following content. AuthType Basic AuthName “Secure Content” AuthUserFile /home/myuser/public_html/.htpasswd require valid-user AuthType: defines the type of authentication. Basic means there is no encryption and the password hash is sent as clear text. AuthName:…

Read More

In the realm of Linux, the at command stands as a powerful yet often overlooked tool for scheduling tasks. This utility is specifically designed for one-time job scheduling, allowing users to execute commands or scripts at a later time. This article delves into the functionality, usage, and practical applications of the at command, providing insights into how it can streamline workflow and automate tasks in a Linux environment. Understanding the ‘at’ Command The at command in Linux is a job scheduling tool, distinct from the more commonly known cron. While cron is used for recurring tasks, at is the tool…

Read More

The find command is a versatile and powerful utility in Linux, allowing users to search for files and directories based on various criteria such as name, type, size, modification time, and more. Mastering the find command can significantly improve your efficiency and effectiveness when working with Linux systems. This article will provide a comprehensive guide to the find command, accompanied by practical examples. Find Command Syntax and Options The basic syntax of the find command is as follows:

PATH: The directory in which to start the search. EXPRESSION: The search criteria, including options and tests. Some common options include:…

Read More

Its a good practice to enable email alerts in your keepalived configuration. By using this keepalived service will always inform users whenever server switches from master to slave or slave to master for each VRRP instance. Below steps will help you to how to enable email alerts in Keepalived. Steps to enable email alerts: Step 1: Edit keepalived configuration file. # /etc/keepalived/keepalived.conf Step 2: Add below entry in global settings. global_defs { notification_email { [email protected] } notification_email_from [email protected] smtp_server mail.tecadmin.net smtp_connect_timeout 30 # …… Other configuration here ……. } Step 3: Add smtp_alert in each VRRP instances. vrrp_instance VI_1 {…

Read More

HTTPD (Hypertext Transfer Protocal Deamon) is a web server widely used with CentOS and Redhat Linux.It serves the webpages on clients requests. It is developed by Apache foundation. HTTPD is very easy in install and configure. Installing httpd using yum. # yum install httpd Default httpd basic configuration are as following. Configuration file: /etc/httpd/conf/httpd.conf Port: 80 Document root: /var/www/html Log file location: /var/log/httpd Setup virtual host in httpd configuration file Append below setting in httpd configuration file <VirtualHost *:80> ServerName www.tecadmin.net ServerAdmin [email protected] DocumentRoot /var/www/html </VirtualHost> Start httpd service # service httpd start Confugure httpd to start on system boot.…

Read More