Send any Linux Command output via E-mail

Create a script file with below syntax :

command > file.tmp
mailx -s "Subject" mailaddress <file.tmp
rm file.tmp
Give script executable permission.

Run Script

Was this answer helpful?

 Print this Article

Also Read

How to Cache or copy a website?

Full website contents can be copied with wget command with below options :wget \--recursive...

How to Configure Centos 6 firewall (iptables)?

Introduction CentOS 6 uses iptables as system firewall.We configure iptables in our default...

KVM create and restore a full backup (Disk Image)

Making a backupBoot the system rescue cd ISO and follow the directions until you get to a...

Set a Cron Job in Linux

There are occasions when you want to create a schedule tasks on your server. Suppose you want to...

How to resize volumes with LVM?

Quick tips: To see the details of logical volume group use: vgdisplay To see the details of...

Powered by WHMCompleteSolution