≡ Menu

Linux

6 Expect Script Command Line Argument Examples

This article explains the command line options that can be passed to an expect script. If you are new to expect scripting language, first start with our expect hello world example. 1. Execute expect script from the command line using -c option expect also also allows you to execute it directly in the command line [...]

{ 3 comments }

Nagios: How to Enable check_nrpe Command Line Arguments

Question: When I execute check_nrpe command with some arguments, I get the message “CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.”. How do I fix this issue? Answer: The issue is very straight forward. check_nrpe doesn’t take any arguments by default. You should enable the command line arguments for [...]

{ 7 comments }

How To Send Desktop Notifications on Ubuntu Using notify-send

notify-send command sends notification to the desktop. It is non intrusive. It does not ask user to press ok, and it does not take any control away from the user. This article explains how to send various types of desktop notifications using notify-send program. 1. Simple Notification notify-send can be used to send simple notification [...]

{ 11 comments }

How Do I ftp and Download files from a UNIX Shell Script

Question: I would like to execute ftp from inside a shell script. I would also like to provide the username and password required for the FTP file download inside the shell script itself. Can you explain me how to perform this bath ftp from a shell script? Answer: For downloading / uploading files using ftp [...]

{ 4 comments }

Question: I know how to execute a Unix command in the foreground. Can you please explain me how I can execute a Linux command in the background? Answer: You can use one of the 5 methods explained in this article to execute a Linux command, or shell script in the background. 1. Execute a command [...]

{ 9 comments }

6 mv Command Examples to Move or Rename Linux File and Directory

Linux mv command is used to move files and directories from one location to another. Apart from moving the files, it can also rename a file or directory. 1. Rename a File While renaming a file using mv command, it keeps the inode number same even after moving it to a different name. If you [...]

{ 5 comments }

Monit is an open source utility that provides several system monitoring functionality that are extremely helpful to sysadmins. This article provides a jumpstart guide on monit installation and configuration. We also discuss a specific example related to processes monitoring. 1. Install monit On Fedora, openSUSE, Debian install monit as a package from the distribution repository. [...]

{ 6 comments }

cpio command is used to process archive files (for example, *.cpio or *.tar files). cpio stands for “copy in, copy out”. cpio performs the following three operations. Copying files to an archive Extracting files from an archive Passing files to another directory tree cpio takes the list of files from the standard input while creating [...]

{ 9 comments }