Home » 2017 » August » 22

Today, we shall talk about one of the most frequently used command in Linux.

TAIL

The command is used to print last 10 lines of a file.

tail -f is used to print the last 10 lines plus it keeps on reading the file if a new data is added to the file.

tail -f can be used if a log is currently being updated. 


But then what is the use of tailf?

tailf is similar to tail -f except one difference that tailf does access the file if the file is not being updated or not growing.

 

... Read more »

Category: Open System-Linux | Views: 1738 | Added by: shanky | Date: 2017-08-22 | Comments (0)

Hereby we shall try to understand a very basic program to send mail using python library smtplib

The smtplib in python defines a client object that can be used to send mail to any internet machine a SMTP listener daemon.

 

1. Create an SMTP object.

import smtplib

smtpObj=smtplib.SMTP(host,portNo);

Note that host or port number are optional.

host: the server where SMTP is running. example: smtp.gmail.com

port number: the port number where SMTP server is listening.

 

... Read more »

Category: Programming Languages | Views: 991 | Added by: shanky | Date: 2017-08-22 | Comments (0)