<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Zen Dzign &#187; Linux</title>
	<atom:link href="http://www.zendzign.com/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zendzign.com</link>
	<description>The official ZZ Servers Blog - Visit http://www.zzservers.com for your business hosting needs.</description>
	<lastBuildDate>Thu, 26 Jan 2012 05:59:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Server cabinet door alarm</title>
		<link>http://www.zendzign.com/2012/01/home-brew-server-cabinet-door-alarm/</link>
		<comments>http://www.zendzign.com/2012/01/home-brew-server-cabinet-door-alarm/#comments</comments>
		<pubDate>Sun, 22 Jan 2012 03:08:38 +0000</pubDate>
		<dc:creator>David M. Zendzian</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PCI]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[embedded]]></category>
		<category><![CDATA[physical security]]></category>
		<category><![CDATA[teensy]]></category>

		<guid isPermaLink="false">http://www.zendzign.com/?p=220</guid>
		<description><![CDATA[The first step in securing servers is to ensure that they are physically as secure as possible and and then monitored for unauthorized access  Many times when setting up servers in a small office or co-location facility many people have their systems in a locking cabinet within a moderately secured physical building.  However a determined [...]]]></description>
			<content:encoded><![CDATA[<p>The first step in securing servers is to ensure that they are physically as secure as possible and and then monitored for unauthorized access  Many times when setting up servers in a small office or co-location facility many people have their systems in a locking cabinet within a moderately secured physical building.  However a <a title="Tiger Team" href="http://video.google.com/videoplay?docid=5642547759793319840">determined attacker</a> can usually bypass many physical controls so adding as many layers and monitoring helps can help both to thwart an attacker or be used to monitor for authorized equipment access through change management filtering on your <a title="Zabbix Maintenance Mode" href="http://www.zabbix.com/documentation/1.8/manual/maintenance_mode_for_gui">monitoring and alerting system</a>.</p>
<p><span id="more-220"></span>One problem with the small office or colo environment is there are very few affordable solutions that can be used to monitor for authorized and unauthorized access.  To solve this problem, ZZ Servers has implemented a cabinet monitoring solution that is able to not only monitor for cabinet door entry but also has the ability to have temperature and humidity sensors (which we do not actually do in this initial proof of concept).</p>
<p>The cabinet door alarm is based on a <a title="PJRC Teensy" href="http://pjrc.com/store/teensy.html">teensy 2.0</a> USB device that uses digital inputs to determine if magnetic alarm door switches are open or closed and then monitor their status with any standard monitoring system through a USB connection to the Teensy device. The teensy can be ordered from <a title="PJRC Teensy" href="http://pjrc.com/store/teensy.html">PJRC</a> for $16. The LED, Resistor and remaining components can be purchased from <a title="Jameco" href="http://www.jameco.com">Jameco</a>, Amazon, Home Depot, Radio Shack or any other similar store.</p>
<p>The teensy is connected through USB to a linux server in the cabinet that runs an application to query the status of each sensor. The teensy provides a +5V pin that will be connected to a 10k ohm resistor which is then connected to the GND with one connection to each of 4 input pins for the door sensor and an LED connected to interface 11.</p>
<p><a href="http://www.zendzign.com/wp-content/uploads/2012/01/zz-cabinetalarm.jpg"><img class="alignnone size-full wp-image-221" title="zz-cabinetalarm-teensy-layout" src="http://www.zendzign.com/wp-content/uploads/2012/01/zz-cabinetalarm.jpg" alt="ZZ Servers Homebrew Teensy Cabinet Alarm Layout" width="225" height="227" /></a></p>
<p>The current design is for only 4 alarm switches; but there is no reason the other inputs can&#8217;t be used. If additional inputs are used then the associated firmware and software programs will need to be updated to reflect the number of interfaces.</p>
<p>This design also expects there to be a closed circuit on all monitored ports otherwise an alarm will be raised. A simple closed loop will work for any alarm switches not installed.</p>
<p>Once the circuit is assembled the firmware needs to be uploaded to the teensy. The firmware used is based on the arduino support for Teensy that can be <a title="Teensy Development Download" href="http://pjrc.com/teensy/td_download.html">downloaded</a>.  The steps to setup the Teensy/Arduino development environment are found on the page and need to be followed to allow for proper aduino sketch to be built and loaded onto the teensy flash.</p>
<ul>
<li><a>Extract Arduino Software</a></li>
<li>Install <a title="Teensy UDEV Rules" href="http://pjrc.com/teensy/49-teensy.rules">49-teensy.rules</a> in /etc/udev/rules.d (see below for contents of this file)</li>
<li><a title="Teensy Duino Download" href="http://www.pjrc.com/teensy/td_download.html">Download</a> &amp; Run teensy duino installer. Examples/samples are not needed unless doing future development</li>
</ul>
<p>Once the development tools are installed:</p>
<ul>
<li>Start the arduino IDE (found in arduino software extract)</li>
<li>Connect the teensy usb interface</li>
<li>Set board type to Teensy 2.0 (Tools/Board/Teensy 2.0)</li>
<li>Load the code (below)</li>
<li>Verify (checkbox in IDE) the code</li>
<li>Upload (right arrow in IDE) the HEX firmware</li>
</ul>
<p><strong>Teensy Firmware:</strong><br />
The firmware has 3 main sections; the Header where the various variables are defined that are used within the program, The setup function which runs when the teensy is powered on (plugged into USB) and then the loop which is executed after setup executing the designed function.</p>
<p>When the teensy boots, it load the setup function which initializes the device allowing for INPUT_PULLUP functionality for the 4 pins used for the alarm. This creates the alert when the switch is opened. The setup then initializes the USB serial device at 38400 8n1 and configures the LED output PIN and makes sure the LED is off.</p>
<p>The loop function is the core of the firmware. This is the function that the teensy executes over and over. In this function the first thing to do is read each of the alarm interfaces and if there is an alert flag it so we can be sure to blink the LED. Next the loop will see if there are any requests on the serial port, which will come from the serial program further down in this post. If there is input from the serial interface, the loop confirms it is a valid request [1,2,3,4] and then prints back on the serial interface a simple message showing the status of the serial ports.</p>
<p>Finally the loop ends by running the BlinkLED function if there is an alarm otherwise if the LED is on be sure to turn it off.</p>
<p>The BlinkLED function works by using a nice variable type provided by the Teensy &#8220;elapsedMillis&#8221; which creates a timer that is used to trace the time since the variable was created. Using this variable if it has been one second (1000ms) then reset the timer and if the LED is on turn it off, otherwise turn it on.<br />
<em>zz_alarm0.ino</em></p><pre class="crayon-plain-tag"><code>// Header Section
int ledPin =&nbsp; 11;
int ledon = 0;
int ALARM_1 = 1;
int ALERT_1 = 0;
int ALARM_2 = 2;
int ALERT_2 = 0;
int ALARM_3 = 3;
int ALERT_3 = 0;
int ALARM_4 = 4;
int ALERT_4 = 0;
int alarmnow = 0;
char alarmcheck = ' ';
elapsedMillis sinceAlarm;
//End Header Section

// The setup() method runs once, when the sketch starts
void setup()&nbsp;&nbsp; {
     pinMode(ALARM_1, INPUT_PULLUP);
     pinMode(ALARM_2, INPUT_PULLUP);
     pinMode(ALARM_3, INPUT_PULLUP);
     pinMode(ALARM_4, INPUT_PULLUP);
     Serial.begin(38400);
     pinMode(ledPin, OUTPUT);
     digitalWrite(ledPin, LOW);
}

// the loop() method runs over and over again, checking for events
void loop()&nbsp;&nbsp; {
     alarmnow = 0;
     alarmcheck = ' ';

     ALERT_1 = digitalRead(ALARM_1);
     ALERT_2 = digitalRead(ALARM_2);
     ALERT_3 = digitalRead(ALARM_3);
     ALERT_4 = digitalRead(ALARM_4);

     if (ALERT_1 || ALERT_2 || ALERT_3 || ALERT_4) {
          alarmnow = 1;
     }

     if (Serial.available()) {
          alarmcheck = Serial.read();
     }

     switch (alarmcheck) {
          case '1':
               if (ALERT_1) {
                    Serial.println(&quot;1:1&quot;);
               } else {
                    Serial.println(&quot;1:0&quot;);
               }
               break;
          case '2':
               if (ALERT_2) {
                    Serial.println(&quot;2:1&quot;);
               } else {
                    Serial.println(&quot;2:0&quot;);
               }
               break;
          case '3':
               if (ALERT_3) {
                    Serial.println(&quot;3:1&quot;);
               } else {
                    Serial.println(&quot;3:0&quot;);
               }
               break;
          case '4':
               if (ALERT_4) {
                    Serial.println(&quot;4:1&quot;);
               } else {
                    Serial.println(&quot;4:0&quot;);
               }
               break;
          case ' ':
               break;
          default:
               Serial.println(&quot;X:1&quot;);
               break;
     }

     if (alarmnow) {
          BlinkLED();
     } else if (ledon) {
          digitalWrite(ledPin, LOW);
     }
}

void BlinkLED() {
     if (sinceAlarm &gt;= 1000) {
          sinceAlarm = sinceAlarm - 1000;
          if (ledon) {
               ledon = 0;
               digitalWrite(ledPin, LOW);
          } else {
               ledon = 1;
               digitalWrite(ledPin, HIGH);
          }
     }
}</code></pre><p>Once the firmware is loaded onto the teensy and all the switches are in place the linux system that will interface with the alarm needs to have a udev rule created that will allow the usbSerial interface to function.<br />
<strong>Linux UDEV rules</strong><em><br />
/etc/udev/rules/49-teensy.rules</em></p>
<blockquote><p>SUBSYSTEMS==&#8221;usb&#8221;, ATTRS{idVendor}==&#8221;16c0&#8243;, ATTRS{idProduct}==&#8221;04[789]?&#8221;, MODE:=&#8221;0666&#8243; KERNEL==&#8221;ttyACM*&#8221;, ATTRS{idVendor}==&#8221;16c0&#8243;, ATTRS{idProduct}==&#8221;04[789]?&#8221;, SYMLINK+=&#8221;ttyUSB00%n&#8221;, MODE:=&#8221;0666&#8243;, ENV{ID_MM_DEVICE_IGNORE}=&#8221;1&#8243;</p></blockquote>
<p>The host that connects to the ZZ-Teensy-Alarm needs to be able to query to the teensy on the USB Serial device to determine the status of any of the configured alarm switch inputs.  This is accomplished using a C program that will open the USB serial device presented by the teensy and write/read to the running firmware queries on port status.</p>
<p>The alarm-monitor application is a very simple C application. After initializing some variables it performs a quick check on the number of command line arguments, providing help and exiting if it is not correct. Next the application confirms that the query provided on the command line is a valid interface to query. Alarm-monitor then initializes the specified serial device to 38400 8n1 and writes out the query to the teensy serial device. Once the query is written the application will wait for a response for 10 seconds after which the appropriate response is sent back to the user.<br />
<strong>Linux Command line zz-teensy-alarm query:</strong><br />
<em>alarm-monitor.c</em></p><pre class="crayon-plain-tag"><code>#include &lt;string.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;stdio.h&gt;
#include &lt;unistd.h&gt;
#include &lt;fcntl.h&gt;
#include &lt;termios.h&gt;
#include &lt;time.h&gt;
 
int main(int argc,char** argv)
{
        struct termios tio;
        struct termios stdio;
        time_t start,now;
        int diff;
        int tty_fd;
        fd_set rdset;
        struct flock fl;
 
        unsigned char c=' ';
 
        if (argc&lt;3) {
          printf(&quot;%s /dev/ttyUSB000 [1|2|3|4]\n\n&quot;,argv[0]);
          exit(1);
        }
 
        switch (argv[2][0]) {
          case '1':
            break;
          case '2':
            break;
          case '3':
            break;
          case '4':
            break;
          default:
            printf(&quot;Can only query alarms 1, 2, 3 or 4\n\n&quot;);
            exit(1);
            break;
        }

        fl.l_type   = F_WRLCK;  /* F_RDLCK, F_WRLCK, F_UNLCK    */
        fl.l_whence = SEEK_SET; /* SEEK_SET, SEEK_CUR, SEEK_END */
        fl.l_start  = 0;        /* Offset from l_whence         */
        fl.l_len    = 0;        /* length, 0 = to EOF           */
        fl.l_pid    = getpid(); /* our PID                      */

        tty_fd=open(argv[1], O_RDWR | O_NONBLOCK);
        fcntl(tty_fd, F_SETLKW, &amp;fl);

        memset(&amp;tio,0,sizeof(tio));
        tio.c_iflag=0;
        tio.c_oflag=0;
        // 8n1, see termios.h for more information
        tio.c_cflag=CS8|CREAD|CLOCAL;           
        tio.c_lflag=0;
        tio.c_cc[VMIN]=1;
        tio.c_cc[VTIME]=5;
 
        cfsetospeed(&amp;tio,B38400);            
        cfsetispeed(&amp;tio,B38400);           
 
        tcsetattr(tty_fd,TCSANOW,&amp;tio);
  
        write(tty_fd,argv[2],1);

        start = time(NULL);
        now = time(NULL);
        diff = (int)difftime(now,start);
        while ((c != '\n') &amp;&amp; (diff &lt; 10)) {
          if (read(tty_fd,&amp;c,1)&gt;0) {
            write(STDOUT_FILENO,&amp;c,1);
          }
          now = time(NULL);
          diff = (int)difftime(now,start);
        }

        fl.l_type   = F_UNLCK;
        fcntl(tty_fd, F_SETLK, &amp;fl);
        close(tty_fd);

        if (diff &gt;= 10) {
          printf(&quot;X:X\n&quot;);
          exit(1);
        }
        exit(0);
}</code></pre><p><p>
The alarm_monitor application can be compiled with gcc:</p>
<p style="padding-left: 30px;">gcc -o alarm_monitor alarm_monitor.c</p>
<p>alarm_monitor has 2 inputs, the first is the USB device of the ZZ-Teensy-Alarm, the 2nd is the port to be queried (1-4 is hard coded, any additional ports need to be expanded on for alarm_monitor.c and zz_alarm0.ino).</p>
<p>EX:</p>
<p style="padding-left: 30px;">alarm_monitor /dev/ttyUSB000 1<br />
1:0</p>
<p>Would query alarm switch 1 and as this example shows returns the alarm #:status where 0 is OK and 1 is switch open (alarm).</p>
<p>There is a 10 second timeout if ZZ-Teensy-Alarm device isn&#8217;t connected or if there are connectivity issues.  An error code of X:X is returned for any timeout and any query to ports other than 1,2,3,4 return invalid query.</p>
<p><strong>Concept Assembly</strong></p>
<p>The initial design was built using a breadboard and is pictured below:</p>
<div id="attachment_225" class="wp-caption alignnone" style="width: 310px"><a href="http://www.zendzign.com/wp-content/uploads/2012/01/Zz-teensy-alarm.jpg"><img class="size-medium wp-image-225" title="ZZ Servers Teensy Cabinet Alarm Prototype" src="http://www.zendzign.com/wp-content/uploads/2012/01/Zz-teensy-alarm-300x199.jpg" alt="ZZ Servers Home Brew Server Alarm Concept" width="300" height="199" /></a><p class="wp-caption-text">ZZ Servers Teensy Cabinet Alarm Prototype</p></div>
<p>Once the design was tested a standard radio shack project box was acquired along with a few screw down termination jacks.  These were assembled into the following picture</p>
<div id="attachment_254" class="wp-caption alignnone" style="width: 310px"><a href="http://www.zendzign.com/wp-content/uploads/2012/01/IMAG0644.jpg"><img class="size-medium wp-image-254" title="ZZ Cabinet Alarm Prototype - Assembly" src="http://www.zendzign.com/wp-content/uploads/2012/01/IMAG0644-300x179.jpg" alt="ZZ Cabinet Alarm Prototype - Assembly" width="300" height="179" /></a><p class="wp-caption-text">ZZ Cabinet Alarm Prototype - Assembly</p></div>
<div id="attachment_255" class="wp-caption alignnone" style="width: 310px"><a href="http://www.zendzign.com/wp-content/uploads/2012/01/IMAG0645.jpg"><img class="size-medium wp-image-255" title="ZZ Cabinet Alarm Prototype - Assembly" src="http://www.zendzign.com/wp-content/uploads/2012/01/IMAG0645-300x179.jpg" alt="ZZ Cabinet Alarm Prototype - Assembly" width="300" height="179" /></a><p class="wp-caption-text">ZZ Cabinet Alarm Prototype - Assembly</p></div>
<p>The final configuration has the usb cable coming out one side, an led on one side and the screw on terminators ready to be connected to magnetic door switches.</p>
<div id="attachment_256" class="wp-caption alignnone" style="width: 310px"><a href="http://www.zendzign.com/wp-content/uploads/2012/01/IMAG0650.jpg"><img class="size-medium wp-image-256" title="ZZ Cabinet Alarm Prototype - Assembled" src="http://www.zendzign.com/wp-content/uploads/2012/01/IMAG0650-300x179.jpg" alt="ZZ Cabinet Alarm Prototype - Assembled" width="300" height="179" /></a><p class="wp-caption-text">ZZ Cabinet Alarm Prototype - Assembled</p></div>
<div id="attachment_257" class="wp-caption alignnone" style="width: 310px"><a href="http://www.zendzign.com/wp-content/uploads/2012/01/IMAG0651.jpg"><img class="size-medium wp-image-257" title="ZZ Cabinet Alarm Prototype - LED on" src="http://www.zendzign.com/wp-content/uploads/2012/01/IMAG0651-300x179.jpg" alt="ZZ Cabinet Alarm Prototype - LED on" width="300" height="179" /></a><p class="wp-caption-text">ZZ Cabinet Alarm Prototype - LED on</p></div>
<p><strong>Zabbix Integration</strong></p>
<p>Once the alarm is in place it needs to be monitored. Here at ZZ Servers we leverage Zabbix but any system such as Nagios could work as long as they can execute a script for input.</p>
<p>Zabbix monitoring can monitor the status of each door alarm through the configuration of UserParameters.  A full configuration will follow in a future post with templates for items / alerts but for now below is a sample UserParameter for each of the 4 configured alarm monitors:</p>
<p><em>/etc/zabbix/zabbix_agentd.conf</em></p>
<blockquote><p>UserParameter=CB001.0001F,/usr/local/bin/alarm-monitor /dev/ttyUSB000 1|cut -d&#8221;:&#8221; -f 2<br />
UserParameter=CB001.0001B,/usr/local/bin/alarm-monitor /dev/ttyUSB000 2|cut -d&#8221;:&#8221; -f 2<br />
UserParameter=CB001.0002F,/usr/local/bin/alarm-monitor /dev/ttyUSB000 3|cut -d&#8221;:&#8221; -f 2<br />
UserParameter=CB001.0002B,/usr/local/bin/alarm-monitor /dev/ttyUSB000 4|cut -d&#8221;:&#8221; -f 2</p></blockquote>
<p>Details on how to configure the zabbix template including the appropriate items, triggers and alerts will be posted in my next blog post.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zendzign.com/2012/01/home-brew-server-cabinet-door-alarm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Anti Virus and PCI Compliance</title>
		<link>http://www.zendzign.com/2009/12/anti-virus-and-pci-compliance/</link>
		<comments>http://www.zendzign.com/2009/12/anti-virus-and-pci-compliance/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 18:14:00 +0000</pubDate>
		<dc:creator>Peter Zendzian</dc:creator>
				<category><![CDATA[PCI]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[anti virus]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[malicious software]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.zendzign.com/?p=92</guid>
		<description><![CDATA[Last year PCI DSS 1.2 was released changing the intent of the controls required for anti-virus software. In version 1.1 anti-virus software was only required for systems commonly affected by viruses and excluded UNIX based operating systems and mainframes. Version 1.2 now requires all operating system types commonly affected by malicious software be protected and [...]]]></description>
			<content:encoded><![CDATA[<p>Last year PCI DSS 1.2 was released changing the intent of the controls required for anti-virus software. In version 1.1 anti-virus software was only required for systems commonly affected by viruses and excluded UNIX based operating systems and mainframes. Version 1.2 now requires all operating system types commonly affected by malicious software be protected and removes the exclusion for UNIX and mainframes. These changes now open the requirement for protection from &#8220;malicious software&#8221; such as worms, trojans, adware, spyware or any &#8220;malicious software&#8221;.<span id="more-92"></span></p>
<p>In the past, it was though Linux servers were safe from viruses but recently hackers have been taking advantage of this false sense of security. Some researchers point out that 70% of attacks on Linux honeypots were infected with a 6 year old virus (RST-B)* and used as command and control points for botnets.</p>
<p>ZZ Servers now offers affordable F-Prot anti-virus software for Windows, Linux, Exchange, BSD and Solaris. Protect your servers, desktops and critical infrastructure today. Contact <a href="http://www.zzservers.com/">ZZ Servers</a> at 800-796-3574 or email support@zzservers.com to arrange for installation of anti-virus software today.</p>
<p>*RST-B is a backdoor malware runs on Linux/UNIX platforms and infects ELF files in the current and /bin directories. This Linux backdoor and virus compromises system security by allowing remote users to manipulate and access infected machines. If executed as root, it will start processes listening on two network interfaces which provide a remote root shell.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zendzign.com/2009/12/anti-virus-and-pci-compliance/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>InterWorx Hosting Control Panel 4.1.0 Upgrade</title>
		<link>http://www.zendzign.com/2009/11/interworx-hosting-control-panel-4-1-0-upgrade/</link>
		<comments>http://www.zendzign.com/2009/11/interworx-hosting-control-panel-4-1-0-upgrade/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 21:39:00 +0000</pubDate>
		<dc:creator>Peter Zendzian</dc:creator>
				<category><![CDATA[InterWorx]]></category>
		<category><![CDATA[Hosting]]></category>
		<category><![CDATA[hosting control panel]]></category>
		<category><![CDATA[Interworx-CP]]></category>
		<category><![CDATA[lamp]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[shared hosting]]></category>

		<guid isPermaLink="false">http://www.zendzign.com/?p=85</guid>
		<description><![CDATA[The dedicated team at InterWorx has released Hosting Control Panel 4.1.0. This is the first release of the 4.x series that will be automatically applied to all current InterWorx servers, versions 3 and higher. All InterWorx servers that have auto-updates enabled can and should receive this update. This will be an incremental release for servers [...]]]></description>
			<content:encoded><![CDATA[<p>The dedicated team at InterWorx has released Hosting Control Panel 4.1.0.</p>
<p>This is the first release of the 4.x series that will be automatically applied to all current InterWorx servers, versions 3 and higher. All InterWorx servers that have auto-updates enabled can and should receive this update.<br />
<span id="more-85"></span></p>
<p>This will be an incremental release for servers already running version 4.0.0. For servers running version 3.0, this upgrade will be significant. From version 3 to 4, virtually every aspect of the software has been improved, inside and out.</p>
<p><strong> Special notes for the version 3 to version 4 upgrade </strong></p>
<p>Given the magnitude of this upgrade from version 3 to version 4, there are a few things you should be on the lookout for:</p>
<p>1) Problems accessing InterWorx immediately following the upgrade<br />
IF you or your customers experience any problem logging in or accessing interworx after the upgrade, the first thing to try to fix it is to login as root, and restart interworx with the command</p>
<div style="margin: 5px 20px 20px;">
<div style="margin-bottom: 2px;">Code:</div>
<pre class="crayon-plain-tag"><code>service iworx restart
service httpd restart</code></pre></div>
<p>If problems persist after that, please open a support ticket.</p>
<p>2) Problems accessing webmail immediately following the upgrade<br />
IF there are any problems accessing webmail, try the following things first:</p>
<div style="margin: 5px 20px 20px;">
<div style="margin-bottom: 2px;">Code:</div>
<pre class="crayon-plain-tag"><code>service iworx restart
service httpd restart
~iworx/cron/iworx.pex --fively</code></pre></div>
<p>If problems persist after that, please open a support ticket.</p>
<p>3) Problems running PHP scripts on client websites<br />
We do not expect there to be significant problems with PHP scripts, but interworx version 4 does provide suphp as an optional server-wide option. In order to provide this feature, the upgrade script will have to make modifications to the clients&#8217; apache virtualhost config files. If these files have been heavily customized, manual intervention may be required.</p>
<p>If needed, backups of the original virtualhost config files will be in /etc/httpd/conf.d/conf_backup/ after the upgrade.</p>
<p>If there are any website problems, first just try restarting the webserver and see if that helps.</p>
<p>As always, any other problems with or questions about this update can be sent via e-mail to <a href="support@zzservers.com">support@zzservers.com</a>, or by opening a support ticket via the web at <a href="https://www.zzservers.com/support" target="_blank">https://www.zzservers.com/support</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.zendzign.com/2009/11/interworx-hosting-control-panel-4-1-0-upgrade/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Important Concepts For Linux Beginners &#8211; Permissions And Groups</title>
		<link>http://www.zendzign.com/2008/05/important-concepts-for-linux-beginners-permissions-and-groups-2/</link>
		<comments>http://www.zendzign.com/2008/05/important-concepts-for-linux-beginners-permissions-and-groups-2/#comments</comments>
		<pubDate>Tue, 13 May 2008 05:38:52 +0000</pubDate>
		<dc:creator>Peter Zendzian</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[permissions]]></category>

		<guid isPermaLink="false">http://www.zendzign.com/2008/05/important-concepts-for-linux-beginners-permissions-and-groups-2/</guid>
		<description><![CDATA[The easiest way to learn Linux permissions is from an example. The ls -l command generates a list of contents, such as files along with their permissions. Let&#8217;s take a look at the default values for a file called Filename. We are adding spaces to make the output more legible. - rw- r&#8211; r&#8211; other [...]]]></description>
			<content:encoded><![CDATA[<p>The easiest way to learn Linux permissions is from an example. The ls -l command generates a list of contents, such as files along with their permissions. Let&#8217;s take a look at the default values for a file called Filename. We are adding spaces to make the output more legible.</p>
<p><span id="more-11"></span></p>
<p>- rw- r&#8211; r&#8211; other information about the file Filename</p>
<p>The initial &#8211; signifies that this is a file (not a directory). The next three characters refer to the file permissions for the file owner, in many cases the person who created the file. The values rw- signify that the owner has read and write (modify) permission but not execute permission. Had these values been r-x the owner would be able to read and execute the file (program) but not modify it. The second set of values r&#8211; signify that the members of the group associated with this file have read but not write or execute permission. The third set of values also r&#8211; signify that other users have read but not write or execute permission.</p>
<p>Permissions are often handled numerically. The r has a value of 4, the w has a value of 2, and the x has a value of 1. In all cases the lack of permission has the value 0. So rw- has the value 6 and r&#8211; has the value 4. In the above example the permissions may be expressed as 644. The full set of permissions for everyone is expressed as 777 (not usually a good idea).</p>
<p>Note that the root user&#8217;s permissions aren&#8217;t listed. This shouldn&#8217;t be surprising because root has essentially complete permissions. But even root&#8217;s doesn&#8217;t have execute permissions for a file it creates. This permission must be added in a separate step. Why? This two-step procedure has important security implications. Let&#8217;s say that someone, perhaps root, has received an email that contains a virus-infested executable program. The program cannot be executed without the explicit permission of root or the recipient. If the user doesn&#8217;t know what to do the virus won&#8217;t be launched.</p>
<p>Linux defines permissions for directories that are similar to but not exactly the same as the file permissions. A read permission on a directory means that its contents may be listed. A write permission on a directory means that the user can modify its contents, by adding, deleting, or renaming files. An execute permission on a directory means that it may be accessed, in other words made the current working directory.</p>
<p>Permissions may be changed via the chmod command as in the example chmod 770 Junque which gives read, write, and execute permissions to the file owner and members of the ownership group but no permissions to anyone else. Not everyone likes working with these numbers. The symbolic mode uses letters and the plus and minus signs to change permissions.</p>
<p>The following command removes the write permission from the user (owner) of the Perm file chmod u-w Perm. To add the execute permission for others, people who do not belong to the group that owns the file apply the command chmod o+x Perm This command only makes sense if the Perm file is executable. Furthermore, under most circumstances the file owner and his or her group will have more permissions that the others. Linux doesn&#8217;t always check to see that your command really makes sense. Do you think that Windows is more intelligent in this respect?</p>
<p>The chown command is used to change the ownership of a file or a directory. The chgrp command is used to change the group ownership of files and directories. These commands might be used when a project passes from the development to the testing stage. Needless to say only the system administrator can execute these commands.</p>
<p>Of course there is more to Linux permissions and groups but we have covered the basics. The next article in this series discusses inodes, a topic that is sorely missing from the Windows bag of tricks.</p>
<p>Levi Reiss has authored or co-authored ten books on computers and the Internet. He loves the occasional glass of wine as exemplified by his wine websites including <a href="http://www.theworldwidewine.com">http://www.theworldwidewine.com</a>. He teaches Linux and Windows operating systems plus other computer courses at an Ontario French-language community college. Visit his new website <a href="http://www.linux4windows.com">http://www.linux4windows.com</a> which teaches you how to download and run Damn Small Linux on Windows computers, even if they are &quot;obsolete.&quot;</p>
<p>Article Source: <a href="http://EzineArticles.com">http://EzineArticles.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.zendzign.com/2008/05/important-concepts-for-linux-beginners-permissions-and-groups-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Set Up A Ubuntu/Debian LAMP Server</title>
		<link>http://www.zendzign.com/2008/05/how-to-set-up-a-ubuntudebian-lamp-server/</link>
		<comments>http://www.zendzign.com/2008/05/how-to-set-up-a-ubuntudebian-lamp-server/#comments</comments>
		<pubDate>Sat, 10 May 2008 14:03:53 +0000</pubDate>
		<dc:creator>Peter Zendzian</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[lamp]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[vps]]></category>

		<guid isPermaLink="false">http://www.zendzign.com/2008/05/how-to-set-up-a-ubuntudebian-lamp-server/</guid>
		<description><![CDATA[Build Your Own Debian/Ubuntu LAMP Server &#8211; Quick &#38; Easy Do it Yourself Installation Apache 2 &#8211; Linux Web server MySQL 5 &#8211; MySQL Database Server PHP4/5 &#8211; PHP Scripting Language phpMyAdmin &#8211; Web-based database admin software. Note: Linux + Apache + MySQL + PHP/Perl together commonly known as LAMP Server. First, let us prepare [...]]]></description>
			<content:encoded><![CDATA[<h3>Build Your Own Debian/Ubuntu LAMP Server &#8211; Quick &amp; Easy Do it Yourself Installation</h3>
<ul>
<li>Apache 2 &#8211; Linux Web server</li>
<li>MySQL 5 &#8211; MySQL Database Server</li>
<li>PHP4/5 &#8211; PHP Scripting Language</li>
<li>phpMyAdmin &#8211; Web-based database admin software.</li>
</ul>
<p>Note: <strong>L</strong>inux + <strong>A</strong>pache + <strong>M</strong>ySQL + <strong>P</strong>HP/Perl together commonly known as <strong>LAMP Server</strong>.</p>
<p><span id="more-8"></span></p>
<p>First, let us prepare a system that has a minimum requirement of Debian/Ubuntu version of Linux with at least<strong> <a href="http://www.zzservers.com/hosting/virtual-private-servers/256/" target="_blank">256MB of RAM available</a></strong>.<strong> </strong>Anything less than this minimum ram will cause lot of problems since we are running a server along especially MySQL and Webmin requires lots of RAM to run properly. MySQL will give you this nasty error &#8220;cannot connect to mysql.sock&#8221; if you don&#8217;t have enough memory in your server.</p>
<p>I love Debian/Ubuntu based Linux because of my enormous affinity towards this command apt-get. As a starter knowing this one command, It is so easy to install packages and you don&#8217;t need to worry about package dependency and configuration. You need to buy a dedicated server or a VPS package if you want to setup your own server. If you want to experiment with the server and installation it is recommended to buy a VPS package. Believe it or not it is so easy to install and configure your server yourself even though you are new are to Linux and dedicated/VPS hosting.</p>
<p>First download <a href="http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe" target="_blank">PuTTy</a> if you are accessing your server through SSH. Just enter the IP of your server with root login to access your host. As you probably know, <a href="http://www.webmin.com/" target="_blank">Webmin</a> is a freely available server control panel and we will setup this once we have completed the LAMP server and Mail Server. Webmin makes more easier for us to fine tune our Linux box.</p>
<p>Before proceeding to install, update the necessary packages with Debian with this command.</p>
<p class="command">apt-get install update</p>
<h3>1. Installing Apache + PHP</h3>
<p>Apache is one of the most famous web server which runs on most Linux based servers. With just few commands you can configure apache to run with PHP 4 or PHP 5.</p>
<p>If you want to install PHP 4, just apt-get</p>
<p class="command">apt-get install apache2 php4 libapache2-mod-php4</p>
<p>To install PHP5, just run the following on Linux shell. Note that if you don&#8217;t specify packages with &#8217;4&#8242;, PHP5 will be automatically installed.</p>
<p class="command">apt-get install apache2 php5 libapache2-mod-php5</p>
<p>Apache configuration file is located at: <span class="system">/etc/apache2/apache2.conf</span> and your web folder is <span class="system">/var/www</span>.</p>
<p>To check whether php is installed and running properly, just create a <span class="system">test.php</span> in your <span class="system">/var/www</span> folder with <span class="system">phpinfo()</span> function exactly as shown below.</p>
<p class="command">vi /var/www/test.php</p>
<pre class="crayon-plain-tag"><code># test.php
&amp;lt;?php phpinfo(); ?&amp;gt;</code></pre><p>Point your browser to <span class="system">http://ip.address/test.php</span> or <span class="system">http://domain/test.php</span> and this should show all your php configuration and default settings.</p>
<p>You can edit necessary values or setup virtual domains using apache configuration file.</p>
<h3>2. Installing MySQL Database Server</h3>
<p>Installing mysql database server is always necessary if you are running a database driven e-commerce site. Remember running MySQL server to a fair extend requires at least 256mb of RAM in your server. So unless you are running database driven sites you don&#8217;t absolutely need MySQL. The following commands will install MySQL 5 server and MySQL 5 client.</p>
<p class="command">apt-get install mysql-server mysql-client php5-mysql</p>
<p>Note: If you have already installed php4, you should make a slight change like this.</p>
<p class="command">apt-get install mysql-server mysql-client php4-mysql</p>
<p>The configuration file of MySQL is located at: <span class="system">/etc/mysql/my.cnf</span></p>
<h4>Creating users to use MySQL and Changing Root Password</h4>
<p>By default mysql creates user as root and runs with no passport. You might need to change the root password.</p>
<p>To change Root Password</p>
<p class="command">mysql -u root</p>
<p>mysql&gt; USE mysql;</p>
<p>mysql&gt; UPDATE user SET Password=PASSWORD(&#8216;new-password&#8217;) WHERE user=&#8217;root&#8217;;</p>
<p>mysql&gt; FLUSH PRIVILEGES;</p>
<p>You must <strong>never use root password</strong>, so you might need to create a user to connect to MySQL database for a PHP script. Alternatively you can add users to MySQL database by using a control panel like <strong>Webmin</strong> or <strong>phpMyAdmin</strong> to easily create or assign database permission to users. We will install Webmin and phpMyAdmin during later once we complete basic installation.</p>
<h3>3. PhpMyAdmin Installation</h3>
<p>PhpMyAdmin is a nice web based database management and administration software and easy to install and configure under apache. Managing databases with tables couldn&#8217;t be much simpler by using phpMyAdmin.</p>
<p>All you need to do is:</p>
<p class="command">apt-get install phpmyadmin</p>
<p>The phpMyAdmin configuration file is located at: <span class="system">/etc/phpmyadmin</span> folder.</p>
<p>To set up under Apache all you need to do is include the following line in <span class="system">/etc/apache2/apache2.conf</span>:</p><pre class="crayon-plain-tag"><code>Include /etc/phpmyadmin/apache.conf</code></pre><p>Now restart Apache:</p>
<p class="command">/etc/init.d/apache2 restart</p>
<p>Point your browser to: <span class="system">http://domain/phpmyadmin</span></p>
<p>That&#8217;s it! MySQL and phpMyAdmin are ready. Log in with your mysql root password and create users to connect to database from your php script.</p>
<p><em>This tutorial was written by Scott who currently runs <a href="http://www.mysql-apache-php.com/" target="_blank">MySQL-Apache-PHP.com</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.zendzign.com/2008/05/how-to-set-up-a-ubuntudebian-lamp-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Useful Commands For The Linux Command Line</title>
		<link>http://www.zendzign.com/2008/05/useful-commands-for-the-linux-command-line/</link>
		<comments>http://www.zendzign.com/2008/05/useful-commands-for-the-linux-command-line/#comments</comments>
		<pubDate>Fri, 09 May 2008 18:13:43 +0000</pubDate>
		<dc:creator>Peter Zendzian</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[command line]]></category>

		<guid isPermaLink="false">http://zendzign.com/?p=6</guid>
		<description><![CDATA[This short guide shows some important commands for your daily work on the Linux command line. arch Outputs the processor architecture. $ arch i686 cat Outputs the contents of a file. $ cat lorem.txt Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim [...]]]></description>
			<content:encoded><![CDATA[<p>This short guide shows some important commands for your daily work on the Linux command line.</p>
<p><span id="more-6"></span></p>
<h3>arch</h3>
<p>Outputs the processor architecture.</p>
<p>$ arch</p>
<p>i686</p>
<h3>cat</h3>
<p>Outputs the contents of a file.</p>
<p>$ cat lorem.txt</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<h3>cd</h3>
<p>Change the working directory.</p>
<p>$ cd /bin</p>
<h3>chgrp</h3>
<p>Change group ownership of files.</p>
<p>$ chgrp games moo.txt</p>
<h3>chmod</h3>
<p>Change access permissions of files.</p>
<p>$ chmod +x helloworld</p>
<h3>chown</h3>
<p>Change file owner and group.</p>
<p># chown root lorem.txt</p>
<h3>cksum</h3>
<p>Print CRC checksum and byte counts of each file.</p>
<p>$ cksum lorem.txt moo.txt</p>
<p>3570240675 453 lorem.txt</p>
<p>4294967295 0 moo.txt</p>
<h3>cp</h3>
<p>Copies a file.</p>
<p>$ cp lorem.txt copy_of_lorem.txt</p>
<h3>date</h3>
<p>Outputs the current date and time.</p>
<p>$ date</p>
<p>Sat Mar 3 12:07:09 GMT 2007</p>
<h3>df</h3>
<p>Reports the amount of disk space used and available on filesystems.</p>
<p>$ df</p>
<p>Filesystem 1K-blocks Used Available Use% Mounted on&lt;br&gt;</p>
<p>/dev/simfs 39845888 218048 39627840 1% /</p>
<h3>dir</h3>
<p>List directory contents.</p>
<p>$ dir</p>
<p>copy_of_lorem.txt lorem.txt moo.txt www</p>
<h3>du</h3>
<p>Estimate file space usage.</p>
<p>$ du -h /bin</p>
<p>7.8M /bin</p>
<h3>echo</h3>
<p>Display a line of text.</p>
<p>$ echo foobar</p>
<p>foobar</p>
<h3>exit</h3>
<p>Cause the shell to exit.</p>
<p>$ exit</p>
<h3>fgrep</h3>
<p>Print lines matching a pattern in a file.</p>
<p>$ fgrep &#8220;irure dolor&#8221; lorem.txt</p>
<p>commodo consequat. Duis aute irure dolor in reprehenderit in voluptate</p>
<h3>find</h3>
<p>Search for files in a directory hierarchy.</p>
<p>$ find hello*</p>
<p>hello_world</p>
<p>hello_world.c</p>
<h3>free</h3>
<p>Display amount of free and used memory in the system.</p>
<p>$ free</p>
<p>total used free shared buffers cached</p>
<p>Mem: 8299892 8287708 12184 0 2641772 1731236</p>
<p>Low: 3581300 3572764 8536</p>
<p>High: 4718592 4714944 3648</p>
<p>-/+ buffers/cache: 3914700 4385192</p>
<p>Swap: 8193140 2335664 5857476</p>
<h3>grep</h3>
<p>Print lines matching a pattern.</p>
<p>$ grep -i apple fruitlist.txt</p>
<p>apple</p>
<h3>groups</h3>
<p>Outputs the user groups of which your account belongs to.</p>
<p>$ groups</p>
<p>games users</p>
<h3>head</h3>
<p>Output the first part of files.</p>
<p>$ head -2 lorem.txt</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod</p>
<p>tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim</p>
<h3>hostname</h3>
<p>Outputs the machines hostname on the network.</p>
<p>$ hostname</p>
<p>anapnea.net</p>
<h3>id</h3>
<p>Outputs user id, group id, and groups of your account.</p>
<p>$ id</p>
<p>uid=1478(smallfoot) gid=100(users) groups=35(games),100(users)</p>
<h3>kill</h3>
<p>End a process.</p>
<p>$ kill -9 18298</p>
<p>-bash: kill: (18298) &#8211; Operation not permitted</p>
<h3>killall</h3>
<p>Kill processes by name.</p>
<p>$ killall irssi</p>
<p>irssi(18298): Operation not permitted</p>
<p>irssi(13372): Operation not permitted</p>
<p>irssi(22048): Operation not permitted</p>
<p>irssi: no process killed</p>
<h3>last</h3>
<p>Show listing of last logged in users.</p>
<p>$ last -n 3</p>
<p>alice pts/6 192.0.34.166 Fri May 18 16:17 still logged in</p>
<p>bob pts/2 64.233.183.103 Fri May 18 16:17 still logged in</p>
<p>clare pts/6 72.5.124.61 Fri May 18 15:54 &#8211; 15:55 (00:01)</p>
<h3>ldd</h3>
<p>Print shared library dependencies.</p>
<p>$ ldd /bin/bash</p>
<p>libncurses.so.5 =&gt; /lib/libncurses.so.5 (0&#215;40023000)</p>
<p>libdl.so.2 =&gt; /lib/libdl.so.2 (0&#215;40065000)</p>
<p>libc.so.6 =&gt; /lib/libc.so.6 (0&#215;40069000)</p>
<p>/lib/ld-linux.so.2 (0&#215;40000000)</p>
<h3>ln</h3>
<p>Make links between files.</p>
<p>$ ln -s data.txt symlink.txt</p>
<h3>logname</h3>
<p>Print user&#8217;s login name.</p>
<p>$ logname</p>
<p>smallfoot</p>
<h3>ls</h3>
<p>List directory contents.</p>
<p>$ ls</p>
<p>copy_of_lorem.txt lorem.txt moo.txt www</p>
<h3>man</h3>
<p>Opens the manual page for a software or function.</p>
<p>$ man bash</p>
<h3>md5sum</h3>
<p>Outputs the MD5 hash sum of a file.</p>
<p>$ md5sum lorem.txt</p>
<p>56da9e37259af34345895883e6fd1a27 lorem.txt</p>
<h3>mkdir</h3>
<p>Makes a directory.</p>
<p>$ mkdir foobar</p>
<h3>mv</h3>
<p>Moves a file.</p>
<p>$ mv lorem.txt ipsum.txt</p>
<h3>nl</h3>
<p>Number lines of files.</p>
<p>$ nl lorem.txt</p>
<p>1 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod</p>
<p>2 tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim</p>
<p>3 veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea</p>
<p>4 commodo consequat. Duis aute irure dolor in reprehenderit in voluptate</p>
<p>5 velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint</p>
<p>6 occaecat cupidatat non proident, sunt in culpa qui officia deserunt</p>
<p>7 mollit anim id est laborum.</p>
<h3>nm</h3>
<p>List symbols from object files.</p>
<p>$ nm hello_world</p>
<p>080494a0 D _DYNAMIC</p>
<p>0804956c D _GLOBAL_OFFSET_TABLE_</p>
<p>08048474 R _IO_stdin_used</p>
<p>w _Jv_RegisterClasses</p>
<p>08049490 d __CTOR_END__</p>
<p>0804948c d __CTOR_LIST__</p>
<p>08049498 d __DTOR_END__</p>
<p>&#8230;</p>
<h3>od</h3>
<p>Dump files in octal and other formats.</p>
<p>$ od -t x /bin/sh</p>
<p>2376640 00098020 000054d4 00000000 00000000</p>
<p>2376660 00000020 00000000 000000c7 00000008</p>
<p>2376700 00000003 080e6500 0009d4f4 00004ae8</p>
<p>&#8230;</p>
<h3>pidof</h3>
<p>Find the process ID of a running program.</p>
<p>$ pidof fetchmail</p>
<p>22392</p>
<h3>ping</h3>
<p>Pings a host.</p>
<p>$ ping -c 2 127.0.0.1</p>
<p>PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.</p>
<p>64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.048 ms</p>
<p>64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.052 ms</p>
<p>&#8212; 127.0.0.1 ping statistics &#8212;</p>
<p>2 packets transmitted, 2 received, 0% packet loss, time 999ms</p>
<p>rtt min/avg/max/mdev = 0.048/0.050/0.052/0.002 ms</p>
<h3>ps</h3>
<p>Outputs running processes.</p>
<p>$ ps</p>
<p>PID TTY TIME CMD</p>
<p>21542 pts/12 00:00:00 bash</p>
<p>27706 pts/12 00:00:00 ps</p>
<h3>pstree</h3>
<p>Display a tree of processes.</p>
<p>$ pstree</p>
<p>init-+-2*[BitchX]</p>
<p>|-3*[bash---sleep]</p>
<p>|-fetchmail</p>
<p>|-screen-+-bash&#8212;irssi</p>
<p>| `-bash&#8212;ctorrent</p>
<p>|-screen-+-bash&#8212;lisp.run</p>
<p>| |-bash&#8212;vi</p>
<p>| |-2*[bash]</p>
<p>| `-bash&#8212;lynx</p>
<p>|-2*[screen---bash---irssi]</p>
<p>|-screen&#8212;irssi</p>
<p>|-screen&#8212;bash</p>
<p>|-screen-+-bash</p>
<p>| `-irssi</p>
<p>|-skjerm&#8212;irssi</p>
<p>|-sshd-+-5*[sshd---sshd---bash---irssi]</p>
<p>| |-8*[sshd---sshd---bash]</p>
<p>| |-sshd&#8212;sshd&#8212;bash&#8212;screen</p>
<p>| |-sshd&#8212;sshd</p>
<p>| `-sshd&#8212;sshd&#8212;bash&#8212;pstree</p>
<p>`-syslog-ng</p>
<h3>pwd</h3>
<p>Outputs the name of current working directory.</p>
<p>$ pwd</p>
<p>/home/smallfoot</p>
<h3>rm</h3>
<p>Removes a file or directory.</p>
<p>$ rm lorem.txt</p>
<h3>rmdir</h3>
<p>Removes a directory.</p>
<p>$ rmdir foobar</p>
<h3>sed</h3>
<p>Stream editor for filtering and transforming text.</p>
<p>$ echo &#8220;My cat&#8217;s name is Bob&#8221; | sed -e &#8216;s/Bob/Mittens/g&#8217;</p>
<p>My cat&#8217;s name is Mittens</p>
<h3>sha1sum</h3>
<p>Outputs the SHA1 hash sum of a file.</p>
<p>$ sha1sum lorem.txt</p>
<p>c942ddebd142ec8bacac9213d48096e74bab4957 lorem.txt</p>
<h3>shutdown</h3>
<p>Bring the system down in a secure way. All logged-in users are notified that the system is going down.</p>
<p>$ shutdown now</p>
<h3>size</h3>
<p>List section sizes and total size.</p>
<p>$ size /bin/bash</p>
<p>text data bss dec hex filename</p>
<p>621233 22712 19176 663121 a1e51 /bin/bash</p>
<h3>stat</h3>
<p>Outputs file status.</p>
<p>$ stat lorem.txt</p>
<p>File: `lorem.txt&#8217;</p>
<p>Size: 453 Blocks: 8 IO Block: 4096 regular file</p>
<p>Device: 77h/119d Inode: 27312217 Links: 1</p>
<p>Access: (0644/-rw-r&#8211;r&#8211;) Uid: ( 1478/smallfoot) Gid: ( 100/ users)</p>
<p>Access: 2007-03-03 12:24:39.000000000 +0000</p>
<p>Modify: 2007-03-03 12:24:39.000000000 +0000</p>
<p>Change: 2007-03-03 12:24:39.000000000 +0000</p>
<h3>strings</h3>
<p>Print the strings of printable characters in files.</p>
<p>$ strings hello_world</p>
<p>/lib/ld-linux.so.2</p>
<p>_Jv_RegisterClasses</p>
<p>__gmon_start__</p>
<p>libc.so.6</p>
<p>puts</p>
<p>_IO_stdin_used</p>
<p>__libc_start_main</p>
<p>GLIBC_2.0</p>
<p>PTRh%</p>
<p>[^_]</p>
<p>Hello World!</p>
<h3>tail</h3>
<p>Output the last part of files.</p>
<p>$ tail -2 lorem.txt</p>
<p>occaecat cupidatat non proident, sunt in culpa qui officia deserunt</p>
<p>mollit anim id est laborum.</p>
<h3>talk</h3>
<p>Talk to another user.</p>
<p>$ talk bob Lookout for the dopefish!</p>
<h3>touch</h3>
<p>Change a file&#8217;s access and modification timestamps. If file does not exist, create it.</p>
<p>$ touch lorem.txt</p>
<h3>tty</h3>
<p>Outputs the name of the current terminal.</p>
<p>$ tty</p>
<p>/dev/pts/16</p>
<h3>uname</h3>
<p>Outputs operating system, hostname, kernel version, date and timp, and processor.</p>
<p>$ uname -a</p>
<p>Linux anapnea.net 2.6.9 #1 SMP Wed Jul 19 16:24:18 MSD 2006 i686 Intel(R) Xeon(TM) CPU 2.80GHz GenuineIntel GNU/Linux</p>
<h3>uptime</h3>
<p>Outputs the system uptime.</p>
<p>$ uptime</p>
<p>14:50:26 up 7 days, 17:52, 18 users, load average: 0.08, 0.02, 0.01</p>
<h3>users</h3>
<p>Print the user names of users currently logged in to the current host.</p>
<p>$ users</p>
<p>alice bob charlie eve</p>
<h3>vdir</h3>
<p>List directory contents.</p>
<p>$ vdir</p>
<p>total 8</p>
<p>-rw-r&#8211;r&#8211; 1 smallfoot users 453 Mar 3 12:32 copy_of_lorem.txt</p>
<p>-rw-r&#8211;r&#8211; 1 smallfoot users 453 Mar 3 12:24 lorem.txt</p>
<p>-rw-r&#8211;r&#8211; 1 smallfoot users 0 Mar 3 12:32 moo.txt</p>
<p>lrwxr-xr-x 1 root root 18 Feb 27 19:33 www -&gt; /var/www/smallfoot</p>
<h3>w</h3>
<p>Show who is logged on and what they are doing.</p>
<p>$ w</p>
<p>12:14:30 up 5 days, 15:16, 19 users, load average: 0.00, 0.00, 0.00</p>
<p>USER TTY LOGIN@ IDLE JCPU PCPU WHAT</p>
<p>charlie pts/0 Fri21 3:26m 2.52s 2.52s irssi</p>
<p>alice pts/2 Wed17 30:21m 0.00s 0.00s -bash</p>
<p>emma pts/4 11:37 36:57 0.00s 0.00s -bash</p>
<p>frank pts/5 11:48 11:03 0.00s 0.00s -bash</p>
<p>smallfoo pts/12 12:01 0.00s 0.04s 0.01s w</p>
<h3>wall</h3>
<p>Send a message to everybody&#8217;s terminal.</p>
<p>$ wall next week we change the server for a new one</p>
<h3>wc</h3>
<p>Counts lines in a file.</p>
<p>$ wc -l lorem.txt</p>
<p>7 lorem.txt</p>
<h3>whatis</h3>
<p>Search the whatis database for complete words.</p>
<p>$ whatis bash</p>
<p>bash (1) &#8211; GNU Bourne-Again SHell</p>
<p>bash [builtins] (1) &#8211; bash built-in commands, see bash(1)</p>
<h3>who</h3>
<p>Outputs who is currently logged into the system.</p>
<p>$ who</p>
<p>charlie pts/0 Mar 2 21:37 (xtreme-11-65.acme.com)</p>
<p>alice pts/2 Feb 28 17:48 (147.21.16.3)</p>
<p>emma pts/4 Mar 3 11:37 (32.84-48-181.uac.com)</p>
<p>frank pts/5 Mar 3 11:48 (port-212-202-233-2.foobar.org)</p>
<p>smallfoot pts/12 Mar 3 12:01 (c-12776f4.cust.example.net)</p>
<h3>whereis</h3>
<p>Locate the binary, source, and manual page files for a command.</p>
<p>$ whereis bash</p>
<p>bash: /bin/bash /etc/bash /usr/share/man/man1/bash.1.gz</p>
<h3>whoami</h3>
<p>Outputs your username / the name of your account.</p>
<p>$ whoami</p>
<p>smallfoot</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zendzign.com/2008/05/useful-commands-for-the-linux-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to search files for specific content</title>
		<link>http://www.zendzign.com/2008/05/how-to-search-files-for-specific-content/</link>
		<comments>http://www.zendzign.com/2008/05/how-to-search-files-for-specific-content/#comments</comments>
		<pubDate>Fri, 09 May 2008 18:06:58 +0000</pubDate>
		<dc:creator>Peter Zendzian</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://zendzign.com/?p=5</guid>
		<description><![CDATA[Simple linux command to search all files in a given path and display the line in the file which matches defined content. find &#60;PATH&#62; -print &#124; xargs grep &#34;&#60;CONTENT&#62;&#34; or find &#60;PATH&#62; -type f -exec grep -H &#34;&#60;CONTENT&#62;&#34; \;]]></description>
			<content:encoded><![CDATA[<p>Simple linux command to search all files in a given path and display the line in the file which matches defined content.</p>
<p>find &lt;PATH&gt; -print | xargs grep &quot;&lt;CONTENT&gt;&quot;</p>
<p>or</p>
<p>find &lt;PATH&gt; -type f -exec grep -H &quot;&lt;CONTENT&gt;&quot; \;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zendzign.com/2008/05/how-to-search-files-for-specific-content/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

