Sponsored Content
The Lounge What is on Your Mind? Hello World Linux - Morning Server Tasks with Your First Coffee Post 303036265 by Neo on Friday 21st of June 2019 05:00:29 AM
Old 06-21-2019
Hello World Linux - Morning Server Tasks with Your First Coffee

New "Beginners" Video:

Hello World Linux - Morning Server Tasks with Your First Coffee

Code:
https://www.youtube.com/watch?v=A0X1_at7JP8

Quote:
Here are the typical Linux commands you would use when you wake up in the morning and are having your first cup of coffee while checking your remote server(s).

Use ssh username@hostname or use ssh username@ipaddress to login to your remote servers when you wake up in the morning.

After logging in it is normally best to cd or “change directory”¯ into your log file directory and check log files.

Now, it is always a good idea to list the files in the directory you are in using the ls command, here we use a long listing ls -l with wildcard match

Using the cat command we can take a look at the contents of text files. In this case, we look at one of the log files.

Seeing nothing of interest or out of the ordinary in our various log file(s), we simply truncate the log files down to 0 bytes like so: truncate -s 0 *log

Let's quickly use the top command to see if there is anything that looks unusual, inspecting web server and database processes, or whatever is your critial application

To leave the top command, press ^c better known as “control c”¯. ^c will often get you out of a jam when you are “stuck”¯ and need a way out Smilie

Use the clear command to clear your terminal screen at anytime.

Next we cd ~ where ~ is pronounced “tilda”¯ and change to our home directory. Then we pwd, or “print working directory”¯ confirming filesystem location.

That's all for this version of “hello world”¯ and our “good morning tasks”¯. Let's type exit and logout of here!

Thanks for watching.

Presented by Daemon Media in 1080 HD for UNIX.com
 

5 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

a world of suse linux problems

1) how do i disable the graphic login in suse linux? 2) how do i disable the graphic boot-up in suse linux? 3) how do i disable the graphic console in suse linux? i think disabling graphic console will disable graphic booting, but what do i know, eh? 4) where is the dhcpcd directory and... (2 Replies)
Discussion started by: nydel
2 Replies

2. Linux

New to Linux world.

Hello~ I recently got a class of Linux. Im running Red Hat Linux. Can you guys help me out on the file extensions, and what they mean. Well the most common ones. Also, how the file system works. I know the '/' is like the beginning of everything. This sounds a little stupid, but i wanna try to... (3 Replies)
Discussion started by: kyoist
3 Replies

3. What is on Your Mind?

How do you like your coffee?

Coffee. That hot black liquid that maintains my sanity when transitioning between day and night schedules. I like to mix it up a lot. Sometimes I like a plain old cup of coffee with no condiments and other times I want creamy, overly sweet espresso based beverage such as cappuccino. How do you like... (14 Replies)
Discussion started by: ilikecows
14 Replies

4. UNIX and Linux Applications

multiple tasks in Linux automatically

How to schedule the multiple tasks in Linux automatically ? (1 Reply)
Discussion started by: saku
1 Replies

5. Shell Programming and Scripting

Simple hello world server

Hi, I m beginner in shell programming, now I want to write a simple server that create a pipe and write "hello" on it. In an other hand, a client connect to this server, and retrieve this message. Thanks for you (4 Replies)
Discussion started by: boro82
4 Replies
Server::Relay(3pm)					User Contributed Perl Documentation					Server::Relay(3pm)

NAME
Net::SMTP::Server::Relay - A simple relay module for Net::SMTP::Server. SYNOPSIS
use Carp; use Net::SMTP::Server; use Net::SMTP::Server::Client; use Net::SMTP::Server::Relay; $server = new Net::SMTP::Server('localhost', 25) || croak("Unable to handle client connection: $! "); while($conn = $server->accept()) { # We can perform all sorts of checks here for spammers, ACLs, # and other useful stuff to check on a connection. # Handle the client's connection and spawn off a new parser. # This can/should be a fork() or a new thread, # but for simplicity... my $client = new Net::SMTP::Server::Client($conn) || croak("Unable to handle client connection: $! "); # Process the client. This command will block until # the connecting client completes the SMTP transaction. $client->process || next; # In this simple server, we're just relaying everything # to a server. If a real server were implemented, you # could save email to a file, or perform various other # actions on it here. my $relay = new Net::SMTP::Server::Relay($client->{FROM}, $client->{TO}, $client->{MSG}); } DESCRIPTION
The Net::SMTP::Server::Relay module implements simple SMTP relaying for use with the Net::SMTP::Server module. All this module does is to take a given message and iterate through the list of recipients, doing DNS lookups for the associated MX record and delivering the messages. This module makes extensive use of the plethora of other modules already implemented for Perl (specifically the DNS and Net::SMTP modules in this case), and should give but a glimpse of the potential for extending the Net::SMTP::Server's functionality to provide a full-featured SMTP server, native to Perl. The above example illustrates the use of the Net::SMTP::Server::Relay modules -- you simply have to instantiate the module, passing along the sender, recipients, and message. More formally: $relay = new Net::SMTP::Server::Relay($from, @to, $msg); Where $from is the sender, @to is an array containing the list of recipients, and $msg is the message to relay. AUTHOR AND COPYRIGHT Net::SMTP::Server / SMTP::Server is Copyright(C) 1999, MacGyver (aka Habeeb J. Dihu) <macgyver@tos.net>. ALL RIGHTS RESERVED. You may distribute this package under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file. SEE ALSO
Net::SMTP::Server::Server, Net::SMTP::Server::Client perl v5.10.1 1999-12-28 Server::Relay(3pm)
All times are GMT -4. The time now is 05:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy