linux

BASH redirection reference

Posted on Updated on

#!/bin/bash

# redirect stdout to file
cmd > file
# redirect stderr to file
cmd 2> file
# redirect both stderr and stdout to file
cmd >& file
# pipe cmd1's stdout to cmd2's stdin
cmd1 | cmd2
# pipe cmd1's stdout and stderr to cmd2's stdin
cmd1 2>&1 | cmd2
# print cmd1's stdout to screen and also write to file
cmd1 | tee file
# print stdout and stderr to screen while writing to file
cmd1 2>&1 | tee file
Advertisements

mRemote – one stop shop for server mgmt

Posted on Updated on

If you haven’t used mRemote, I strongly recommend you do.  This is a great application that is a “one stop shop” remote server and device management tool.  You can manage anything and everything which uses these protocols  (RDP, VNC, ICA, SSH, Telnet, RAW, Rlogin and HTTP/S).  So basically any UNIX, Linux, Windows server, any network switch or device that you are remotely administering – all through one application.  The connections can be easily duplicated, and sorted as well as folders for organization.

All in all, a great tool for managing a mixed environment of OS and devices!

Here’s a link to the product overview:

http://www.mremote.org/wiki/Overview.ashx