Pages

Welcome to My Blog

This is to share my IT experience with friends all around the world.
I have been working in Linux Fedora Systems for more than 8 years. Its fun to share knowledge and learn..
As everyone knows when a problem arises in your systems "googling" is the way that many depend on..

All the posts here are my working experiences during my working life.. So you can count on it..

I have added the references where I got help in solving IT issues


Thursday, April 28, 2011

Mailing file contents though command line

You may know this but I feel it is bit useful as it provides a way to send important data in a file to your mailbox while working in a Linux server and you are so busy to copy and paste content in the mail body.

Command:

cat "file you required to send content" | /bin/mail -s "Subject" user@your.domain

Attach file in command line

Attache a file can be done in several ways;

I have used 'nail' command to attache a file and send to a user

Command is as fellows

cat "file you want to include as the body content" | nail -a -s "Subject" user@=usersdomain