Solaris

Exporting full X windows session via ssh

Posted by Ryan on February 20, 2009 in ComputerInfo, Linux, Solaris

Environment
client1 – your local machine that you want to view the server’s full gnome X session on.
server1 – the server that will send its X display through the ssh tunnel, to display on client1.
Syntax
Type the following from client side.
Xephyr -ac -screen 1024×768 -reset -terminate 2> /dev/null :1 &
DISPLAY=:1.0 ssh -XC root@server1 gnome-session 2>/dev/null

Extracting log file contents, with sed and awk.

Posted by Ryan on October 28, 2008 in Linux, Solaris

Extract data from a file that contains a list of information. Lets say I have a logfile /tmp/logfile that contains hostnames in the following format (See below). All I want is the hostname, nothing else.  Typing grep and the hostname will return the entire line that contains that hostname.  However using sed, awk, [...]

Common Linux commands and syntax

Posted by Ryan on September 28, 2008 in Linux, Solaris

A list of commands and their syntax, some of which for some reason, seem to escape me only when I need it.
tar -cvf <archive name> <source directory> (create an archive from a directory)
rsync -auEv <source directory> <destination directory> (copy files locally from one location to another keeping all permissions and modification dates and Executibility)
rsync -auvEe [...]

Shell Script, While Read

Posted by Ryan on July 26, 2008 in Linux, Solaris

The “while read” function of shell scripting is great for performing a common task on multiple pieces of data. Here, check out the code section, and I’ll explain more.
Purpose: To check if multiple rpm packages are installed on a linux OS.
Code:
#!/bin/sh
while read i #read from input and assign the variable “i” to each [...]

Compiling Application Source Files

Posted by Ryan on March 16, 2008 in Linux, Solaris

If you find an application that you want, but can’t find a binary for it… you’re probably left only with the source code as an option. I have listed and briefly described the three main commands to properly configure and compile source code.
First unpack (gunzip, bunzip2, unzip) the application file(s)
Then “cd” into the unpacked [...]

Combine multi-segment DVD downloads

Posted by Ryan on March 7, 2008 in Linux, Solaris, Windows

Need to download a DVD image for a progam or operating system? Chances are, the download will be in pieces that will need to be re-assembled after the download is complete. This can be done by following the steps below.
SOLARIS/LINUX
cat piece1 piece2 piece3 > entirefile
WINDOWS
copy /b piece1 + piece2 + piece3 entirefile

Solaris/Windows Function Comparison

Posted by Ryan on July 16, 2007 in Solaris, Windows

Basic Commands
Solaris | Windows
ls -l | dir (displays a listing of the contents of the current working directory)
vi | edit (runs an editor to modify the contents of a file)
rm | del (removes/deletes a [...]