<?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>Unix Sysadmin &#187; Unix</title>
	<atom:link href="http://www.sysadmindayph.com/blog/category/operating-system/unix/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sysadmindayph.com/blog</link>
	<description>SysAdmin Blog, TechTips and Reviews</description>
	<lastBuildDate>Fri, 27 Jan 2012 04:36:08 +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>KSH Script Basics &#124; Special Shell Variables</title>
		<link>http://www.sysadmindayph.com/blog/ksh-script-basics-special-shell-variables/</link>
		<comments>http://www.sysadmindayph.com/blog/ksh-script-basics-special-shell-variables/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 02:57:31 +0000</pubDate>
		<dc:creator>elizar</dc:creator>
				<category><![CDATA[Commands]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[if else]]></category>
		<category><![CDATA[if else if]]></category>
		<category><![CDATA[ksh shell]]></category>
		<category><![CDATA[ksh shell script]]></category>
		<category><![CDATA[shell script]]></category>
		<category><![CDATA[special shell variable]]></category>

		<guid isPermaLink="false">http://www.sysadmindayph.com/blog/?p=221</guid>
		<description><![CDATA[Just deleted tons of stale, unsused user accounts. Here are some KSH shell basics and special shell variable. I need to Google them up myself to get reminded that &#8216;$?&#8217; is the output variable for script execution. That is, it&#8217;s 0 for successful execution and 1 if there is any error. Special shell variables There &#8230; <a href="http://www.sysadmindayph.com/blog/ksh-script-basics-special-shell-variables/">Continue reading</a>]]></description>
			<content:encoded><![CDATA[<p>Just deleted tons of stale, unsused user accounts. Here are some KSH shell basics and special shell variable. I need to Google them up myself to get reminded that &#8216;$?&#8217; is the output variable for script execution. That is, it&#8217;s 0 for successful execution and 1 if there is any error.</p>
<p><span id="more-221"></span></p>
<p>Special shell variables<br />
There are some variables which are set internally by the shell and which are available to the user:</p>
<p>Name          Description<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
$1 &#8211; $9       these variables are the positional parameters.</p>
<p>$0            the name of the command currently being executed.</p>
<p>$#            the number of positional arguments given to this<br />
              invocation of the shell.</p>
<p>$?            the exit status of the last command executed is<br />
              given as a decimal string.  When a command<br />
              completes successfully, it returns the exit status<br />
              of 0 (zero), otherwise it returns a non-zero exit<br />
              status.</p>
<p>$$            the process number of this shell &#8211; useful for<br />
              including in filenames, to make them unique.</p>
<p>$!            the process id of the last command run in<br />
              the background.</p>
<p>$-            the current options supplied to this invocation<br />
              of the shell.</p>
<p>$*            a string containing all the arguments to the<br />
              shell, starting at $1.</p>
<p>$@            same as above, except when quoted.</p>
<p><strong>Branching</strong><br />
<code>if then fi<br />
if [[ $value -eq 7 ]];then<br />
   print "$value is 7"<br />
fi</code><br />
or:</p>
<p><code>if [[ $value -eq 7 ]]<br />
then<br />
   print "$value is 7"<br />
fi</code>or:</p>
<p><code>if [[ $value -eq 7 ]];then print "$value is 7";fi</p>
<p>if then else fi<br />
if [[ $name = "John" ]];then<br />
   print "Your welcome, ${name}."<br />
else<br />
   print "Good bye, ${name}!"<br />
fi</code></p>
<p><code>if then elif then else fi<br />
if [[ $name = "John" ]];then<br />
   print "Your welcome, ${name}."<br />
elif [[ $name = "Hanna" ]];then<br />
   print "Hello, ${name}, who are you?"<br />
else<br />
   print "Good bye, ${name}!"<br />
fi</code></p>
<p><code>case esac<br />
case $var in<br />
   john|fred) print $invitation;;<br />
   martin)    print $declination;;<br />
   *)         print "Wrong name...";;<br />
esac</code></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p><strong>Looping Command Syntax for Scripts</strong></p>
<p><code>while do done<br />
while [[ $count -gt 0 ]];do<br />
   print "\$count is $count"<br />
   (( count -= 1 ))<br />
done</code><br />
<code>until do done<br />
until [[ $answer = "yes" ]];do<br />
   print -n "Please enter \"yes\": "<br />
   read answer<br />
   print ""<br />
done</code><br />
<code>for var in list do done<br />
for foo in $(ls);do<br />
   if [[ -d $foo ]];then<br />
      print "$foo is a directory"<br />
   else<br />
      print "$foo is not a directory"<br />
   fi<br />
done</code><br />
continue&#8230;break<br />
One can skip the rest of a loop and directly go to the next iteration with: &#8220;continue&#8221;. </p>
<p><code>while read line<br />
do<br />
   if [[ $line = *.gz ]];then<br />
      continue<br />
   else<br />
      print $line<br />
   fi<br />
done</code><br />
One can also prematurely leave a loop with: &#8220;break&#8221;. </p>
<p><code>while read line;do<br />
   if [[ $line = *!(.c) ]];then<br />
      break<br />
   else<br />
      print $line<br />
   fi<br />
done</code></p>
<p>http://www.well.ox.ac.uk/~johnb/comp/unix/ksh.html</p>
<p>Removing accounts from predefine list:</p>
<p><code>#!/bin/ksh</p>
<p>for each in `cat ./list-a`<br />
do<br />
  grep -i $each  /etc/passwd<br />
    if [[ $? -eq 1 ]]; then<br />
        echo "$each does not exists."<br />
        sleep 2<br />
        continue;<br />
    else<br />
        echo "$each exists"<br />
        echo "Deleting account.. "<br />
        sleep 2<br />
        userdel $each<br />
        echo "$each deleted"<br />
        sleep 5<br />
     fi</p>
<p>done</code></p>
<p>Or course, the sleep there is just for aesthetic.. I want to see the screen</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sysadmindayph.com/blog/ksh-script-basics-special-shell-variables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>getfacl and setfacl &#8211; Unix Access Control (acl) Tool</title>
		<link>http://www.sysadmindayph.com/blog/getfacl-and-setfacl-unix-access-control-acl-tool/</link>
		<comments>http://www.sysadmindayph.com/blog/getfacl-and-setfacl-unix-access-control-acl-tool/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 14:12:06 +0000</pubDate>
		<dc:creator>elizar</dc:creator>
				<category><![CDATA[Commands]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[access list]]></category>
		<category><![CDATA[acl]]></category>
		<category><![CDATA[getfacl]]></category>
		<category><![CDATA[setfacl]]></category>

		<guid isPermaLink="false">http://www.sysadmindayph.com/blog/?p=194</guid>
		<description><![CDATA[Today&#8217;s topic is all about Access List&#8230; For Unix and Unix-like system, the usual command to set the file permission is the &#8216;chmod&#8217; command. However there are instances that we need more flexibility in giving access and control for files and folders. Get it? Access and Control? In this situation, there is a file utility &#8230; <a href="http://www.sysadmindayph.com/blog/getfacl-and-setfacl-unix-access-control-acl-tool/">Continue reading</a>]]></description>
			<content:encoded><![CDATA[<p>Today&#8217;s topic is all about <strong>Access List</strong>&#8230; For Unix and Unix-like system, the usual command to set the file permission is the &#8216;chmod&#8217; command. However there are instances that we need more flexibility in giving access and control for files and folders. Get it? Access and Control? In this situation, there is a file utility built in Unix called &#8216;<strong>getfacl</strong>&#8216; and &#8216;<strong>setfacl</strong>&#8216;.</p>
<p><strong><br />
getfacl</strong> is a file utility for viewing the access control list information associated with a file or directory.</p>
<p>For a memory aid, you can think of &#8216;getfacl&#8217; as &#8220;<strong>G</strong>et <strong>F</strong>ile <strong>ACL</strong>&#8220;.. ACL being Access Control List.</p>
<p>Access control lists are extended attributes added to most major file systems in the 2.6 kernel to improve ability to control the access of files. They allow permissions to be set for individual groups and users and not just the owning user, owning group, and all other users.</p>
<p><strong>setfacl</strong> is a command that allows you to set the Access Control List information for a file or directory.</p>
<p>Access control lists are extended attributes added to most major file systems in the 2.6 kernel to improve ability to control the access of files. They allow permissions to be set for individual groups and users and not just the owning user, owning group, and all other users.</p>
<p>You can read man pages for both <a href="http://www.unix.com/man-page/All/1/getfacl/">getfacl</a> and <a href="http://www.unix.com/man-page/All/1/setfacl/">setfacl</a> for more information.</p>
<p>getfacl and setfacl example&#8230;.</p>
<p>Here&#8217;s an example of using the basic funtion of getfacl and setfacl</p>
<p># getfacl</p>
<p>#setfacl</p>
<p>setfacl -m default:user::rwx,default:group::r-x,default:other:r-x,default:mask:rwx /u06/OneSource/datapump_dbdump</p>
<p>setfacl -m default:user:rcodapp1:r-x,default:group:r-x,default:other:&#8212;,default:mas:rwx /u06/OneSouce/datapump_dbdump</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sysadmindayph.com/blog/getfacl-and-setfacl-unix-access-control-acl-tool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unlock locked user account in HP-UX</title>
		<link>http://www.sysadmindayph.com/blog/unlock-locked-user-account-in-hp-ux/</link>
		<comments>http://www.sysadmindayph.com/blog/unlock-locked-user-account-in-hp-ux/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 12:54:42 +0000</pubDate>
		<dc:creator>elizar</dc:creator>
				<category><![CDATA[HP-UX]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[hpux]]></category>
		<category><![CDATA[lock user]]></category>
		<category><![CDATA[modprpw]]></category>

		<guid isPermaLink="false">http://www.sysadmindayph.com/blog/?p=170</guid>
		<description><![CDATA[I know nothing about HP UX (yeah, except SAM). That&#8217;s why, just now, when there&#8217;s a request to just make a trace route from an HPUX server to another server, I have to login and do execute the command. I couldn&#8217;t log in as my user id so i logged in as root instead from &#8230; <a href="http://www.sysadmindayph.com/blog/unlock-locked-user-account-in-hp-ux/">Continue reading</a>]]></description>
			<content:encoded><![CDATA[<p>I know nothing about HP UX (yeah, except SAM). That&#8217;s why, just now, when there&#8217;s a request to just make a trace route from an HPUX server to another server, I have to login and do execute the command. I couldn&#8217;t log in as my user id so i logged in as root instead from the console.</p>
<p>I check grep&#8217;d my account the walah! It was there! I reset the password, open an ssh terminal and tried to login. unsuccessful, that&#8217;s why i knew then that it is locked.</p>
<p>Here&#8217;s how to unlock a locked user account in HP UX in command line.</p>
<blockquote><p><span><span style="color: #434343;">In HP-UX 11.xx if user account is locked, you can unlock the account by running SAM. But running SAM takes some time usually 2-3 minutes on heavily loaded HP-UX servers. You can unlock the locked user account from command line by running following command: </span></span></p>
<p><span style="color: #434343;">1. Login as root or use sudo from your account, if there is no <strong>sudo</strong> installed just use <strong>su – root :</strong> </span></p>
<div style="margin-left: 26pt;">
<table style="border-collapse: collapse;" border="0">
<colgroup>
<col style="width: 522px;"></col>
</colgroup>
<tbody>
<tr>
<td style="border: 0.5pt dotted; padding-left: 7px; padding-right: 7px;">
<p style="margin-left: 18pt;"><span style="color: #434343; font-family: Courier New;">$sudo su – </span></p>
<p style="margin-left: 18pt;"><span style="color: #434343; font-family: Courier New;">*******</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p><span style="color: #434343;"><span style="font-family: Courier New;">2.</span> Run this command to unlock the locked HP-UX user account:<span style="font-family: Courier New;"> </span></span></p>
<div style="margin-left: 26pt;">
<table style="border-collapse: collapse;" border="0">
<colgroup>
<col style="width: 522px;"></col>
</colgroup>
<tbody style="font-family: courier new;">
<tr>
<td style="border: 0.5pt dotted; padding-left: 7px; padding-right: 7px;"><span style="color: #434343;">#</span><span style="color: black;">/usr/lbin/modprpw –l –k johnm</span></td>
</tr>
</tbody>
</table>
</div>
<p><span style="font-family: Arial; color: black;">Running modprpw will unlock the locked user account in HP-UX from command line.without running SAM </span></p>
<p><span style="font-family: Arial; color: black;">NOTE: modprpw is HP-UX command only and wouldn&#8217;t work in Solaris,AIX and any Linux servers </span></p></blockquote>
<p>That info was &#8216;borrowed&#8217; from <a href="http://sysdigg.blogspot.com/2007/12/how-to-unlock-locked-user-account-in-hp.html" rel="nofollow">here</a>&#8230;. thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sysadmindayph.com/blog/unlock-locked-user-account-in-hp-ux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Send Break on SPARC Enterprise T5120 &#8211; Send Break on ILOM</title>
		<link>http://www.sysadmindayph.com/blog/send-break-on-sparc-enterprise-t5120-send-break-on-ilom/</link>
		<comments>http://www.sysadmindayph.com/blog/send-break-on-sparc-enterprise-t5120-send-break-on-ilom/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 09:06:20 +0000</pubDate>
		<dc:creator>elizar</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Solaris 10]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[alom]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[ilom]]></category>
		<category><![CDATA[sp console]]></category>
		<category><![CDATA[sparc enterprise]]></category>
		<category><![CDATA[t5120]]></category>

		<guid isPermaLink="false">http://www.sysadmindayph.com/blog/?p=169</guid>
		<description><![CDATA[Send Break on SPARC Enterprise T5120 &#8211; well it for the T5000 series I guess, the newer ones. Or &#8220;Sending Break onan ILOM.. &#8220;-&#62;&#8221; = ILOM &#8220;sc&#62;&#8221; = ALOM .. and since this particular server has the &#8220;-&#62;&#8221; prompt we&#8217;re using the ILOM. From ILOM to Solaris: -&#62; start /SP/console From ALOM to Solaris: sc&#62; &#8230; <a href="http://www.sysadmindayph.com/blog/send-break-on-sparc-enterprise-t5120-send-break-on-ilom/">Continue reading</a>]]></description>
			<content:encoded><![CDATA[<p>Send Break on SPARC Enterprise T5120 &#8211; well it for the T5000 series I guess, the newer ones. Or &#8220;Sending Break onan ILOM..</p>
<blockquote><p>&#8220;-&gt;&#8221;    = ILOM<br />
&#8220;sc&gt;&#8221;  = ALOM</p></blockquote>
<p>.. and since this particular server has the &#8220;-&gt;&#8221; prompt we&#8217;re using the ILOM.</p>
<p>From ILOM to Solaris:<br />
-&gt; start /SP/console</p>
<p>From ALOM to Solaris:<br />
sc&gt; console</p>
<p>And of course.. Enter &#8220;#.&#8221; to return to ALOM / ILOM !!</p>
<p><strong>Send Break on ILOM</strong></p>
<p><span style="color: red;">set /HOST send_break_action=break</span><br />
and then<br />
<span style="color: red;">start /SP/console</span></p>
<p>c)ontinue, s)ync, r)eset? s</p>
<p>bada bing! bada boom!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sysadmindayph.com/blog/send-break-on-sparc-enterprise-t5120-send-break-on-ilom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configure Virtual Hosting in Apache Web Server</title>
		<link>http://www.sysadmindayph.com/blog/configure-virtual-hosting-in-apache-web-server/</link>
		<comments>http://www.sysadmindayph.com/blog/configure-virtual-hosting-in-apache-web-server/#comments</comments>
		<pubDate>Tue, 19 Aug 2008 12:59:32 +0000</pubDate>
		<dc:creator>elizar</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[Web Hosting]]></category>
		<category><![CDATA[web server]]></category>
		<category><![CDATA[multiple domain]]></category>
		<category><![CDATA[shared server]]></category>
		<category><![CDATA[virtual host]]></category>

		<guid isPermaLink="false">http://www.sysadmindayph.com/blog/?p=90</guid>
		<description><![CDATA[When we say or mention the word Web Server, the first thing that comes to our mind is Apache, right? (if you don&#8217;t then what are you doing here reading this? ) Apache is the most well known open source web server there is! Open source?? Make that the most wildly used webserver on the &#8230; <a href="http://www.sysadmindayph.com/blog/configure-virtual-hosting-in-apache-web-server/">Continue reading</a>]]></description>
			<content:encoded><![CDATA[<p>When we say or mention the word Web Server, the first thing that comes to our mind is Apache, right? (if you don&#8217;t then what are you doing here reading this? <img src='http://www.sysadmindayph.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> )</p>
<p>Apache is the most well known open source web server there is! Open source?? Make that the most wildly used webserver  on the internet, period!</p>
<p>It is believed (and i know they made a survey or study about it) that Apache takes 90% of all web servers in the internet. Most web hosting company, and I&#8217;ve once worked in one, use Apache.</p>
<p>This post will talk about how to setup Apache for Virtual Hosting</p>
<p><span id="more-90"></span></p>
<p>Setting Up A Virtual Host in Apache</p>
<p>create a completely seperate document root, cgi-bin directory, and logfile directory for each host. You can place these beneath the standard Debian prefix of /var/www or you may use a completely different root</p>
<blockquote>
<pre>root@irony:~# mkdir /home/www

root@irony:~# mkdir /home/www/www.example.com
root@irony:~# mkdir /home/www/www.example.com/htdocs
root@irony:~# mkdir /home/www/www.example.com/cgi-bin
root@irony:~# mkdir /home/www/www.example.com/logs

root@irony:~# mkdir /home/www/www.example.net
root@irony:~# mkdir /home/www/www.example.net/htdocs
root@irony:~# mkdir /home/www/www.example.net/logs
root@irony:~# mkdir /home/www/www.example.net/cgi-bin

root@irony:~# mkdir /home/www/www.example.org
root@irony:~# mkdir /home/www/www.example.org/htdocs
root@irony:~# mkdir /home/www/www.example.org/logs

root@irony:~# mkdir /home/www/www.example.org/cgi-bin</pre>
</blockquote>
<p>NEt<br />
Here we&#8217;ve setup three different directory trees, one for each site. If you wanted to have identical content it might make sense to only create one, and then use symbolic links instead.</p>
<p>The next thing to do is to enable virtual hosts in your Apache configuration. The simplest way to do this is to create a file called /etc/apache2/conf.d/virtual.conf and include the following content in it:</p>
<blockquote>
<pre>#
#  We're running multiple virtual hosts.
#
Nameserver *

NameVirtualHost *</pre>
</blockquote>
<p>(When Apache starts up it reads the contents of all files included in /etc/apache2/conf.d, and files you create here won&#8217;t get trashed on package upgrades.)</p>
<p>Once we&#8217;ve done this we can create the individual host configuration files. The Apache2 setup you&#8217;ll find on Debian GNU/Linux includes two directories for locating your site configuration files:</p>
<p>/etc/apache2/sites-available</p>
<p>This contains configuration files for sites which are available but not necessarily enabled.<br />
/etc/apache2/sites-enabled</p>
<p>This directory contains site files which are enabled.</p>
<p>As with the conf.d directory each configuration file in the sites-enabled directory is loaded when the server starts &#8211; whilst the files in sites-available are completely ignored.</p>
<p>You are expected to create your host configuration files in /etc/apache2/sites-available, then create a symbolic link to those files in the sites-enabled directory &#8211; this will cause them to be actually loaded/read.</p>
<p>Rather than actually messing around with symbolic links the Debian package includes two utility commands a2ensite and a2dissite which will do the necessary work for you as we will demonstrate shortly.</p>
<p>Lets start with a real example. Create /etc/apache2/sites-available/www.example.com with the following contents:</p>
<blockquote>
<pre>#
#  Example.com (/etc/apache2/sites-available/www.example.com)
#
&lt;VirtualHost *&gt;
ServerAdmin webmaster@example.com
ServerName  www.example.com
ServerAlias example.com

# Indexes + Directory Root.
DirectoryIndex index.html
DocumentRoot /home/www/www.example.com/htdocs/

# CGI Directory
ScriptAlias /cgi-bin/ /home/www/www.example.com/cgi-bin/
&lt;Location /cgi-bin&gt;
Options +ExecCGI
&lt;/Location&gt;

# Logfiles
ErrorLog  /home/www/www.example.com/logs/error.log
CustomLog /home/www/www.example.com/logs/access.log combined

&lt;/VirtualHost&gt;</pre>
</blockquote>
<p>ow we&#8217;ve got:</p>
<ul>
<li>Three directories which can be used to contain our content.</li>
<li>Three directories which can be used to contain our logfiles.</li>
<li>Three directories which can be used to contain our dynamic CGI scripts.</li>
<li>Three configuration files which are being ignored by Apache.</li>
</ul>
<p>To enable the sites simply run:</p>
<pre>root@irony:~# a2ensite www.example.com
Site www.example.com installed; run /etc/init.d/apache2 reload to enable.

root@irony:~# a2ensite www.example.net
Site www.example.net installed; run /etc/init.d/apache2 reload to enable.

root@irony:~# a2ensite www.example.org
Site www.example.org installed; run /etc/init.d/apache2 reload to enable.</pre>
<p>This will now create the symbolic links so that <tt>/etc/apache2/sites-enabled/www.example.org</tt>, etc, now exist and will be read.</p>
<p>Once we&#8217;ve finished our setup we can restart, or reload, the webserver as the output above instructed us to do with:</p>
<pre>root@irony:~# /etc/init.d/apache2 reload
Reloading web server config...done.
root@irony:~#</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.sysadmindayph.com/blog/configure-virtual-hosting-in-apache-web-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>All About Arlo Gilbert</title>
		<link>http://www.sysadmindayph.com/blog/all-about-arlo-gilbert/</link>
		<comments>http://www.sysadmindayph.com/blog/all-about-arlo-gilbert/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 12:07:24 +0000</pubDate>
		<dc:creator>elizar</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.sysadmindayph.com/blog/?p=76</guid>
		<description><![CDATA[Who in heaven is Arlo Gilbert? Yep, using &#8216;heaven&#8217; is perfect for describing this man for he do sometimes tries to conquer heaven. He&#8217;s into planes you see. Anyway, you&#8217;re probably Googling about Arlo Gilbert as you read this post. Well, let me save you a few minutes and introduce you to Mr. Gilbert in &#8230; <a href="http://www.sysadmindayph.com/blog/all-about-arlo-gilbert/">Continue reading</a>]]></description>
			<content:encoded><![CDATA[<p>Who in heaven is <strong>Arlo Gilbert</strong>? Yep, using &#8216;heaven&#8217; is perfect for describing this man for he do sometimes tries to conquer heaven. He&#8217;s into planes you see. <img src='http://www.sysadmindayph.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Anyway, you&#8217;re probably Googling about <em><a title="arlo gilbert" href="http://www.arlogilbert.com/" target="_blank">Arlo Gilbert</a></em> as you read this post. Well, let me save you a few minutes and introduce you to Mr. Gilbert in one fast minute.</p>
<p>He is the following:</p>
<ul>
<li>The Man is from Austin, Texas</li>
<li>Arlo Gilbert is a high school drop out&#8230; and a proud one (don&#8217;t do that boys and girls)</li>
<li>A family man! So there&#8217;s a Mrs. Gilbert and two little Arlo Gilberts (daughters)</li>
</ul>
<p>The reason why we feature this brilliant man is that he has successfully launched online startups and been doing it for 10 years now. Remember, high school dropout and no training in marketing or any business related studies&#8230; Brilliant indeed.</p>
<p>What caught my attention while reading his &#8216;About&#8217; page was his current project &#8211; the iCall. It&#8217;s a VOIP startup company. I was wondering if iCall was developed by <a title="arlo gilbert" href="http://elizar.palad.info/blog/this-arlo-gilbert-dude">Arlo Gilbert</a> or if it uses <a href="http://www.sysadmindayph.com/blog/asterisk-overview-an-open-source-voip-application/">Asterisk</a>?</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p><a href="http://tekkenphilippines.com">Tekken Philippines</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sysadmindayph.com/blog/all-about-arlo-gilbert/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>vi Search and Replace&#8230; The Basics, Dummy&#8217;s Reference</title>
		<link>http://www.sysadmindayph.com/blog/vi-search-and-replace-the-basics-dummys-reference/</link>
		<comments>http://www.sysadmindayph.com/blog/vi-search-and-replace-the-basics-dummys-reference/#comments</comments>
		<pubDate>Wed, 12 Mar 2008 22:18:04 +0000</pubDate>
		<dc:creator>elizar</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.sysadmindayph.com/blog/vi-search-and-replace-the-basics-dummys-reference/</guid>
		<description><![CDATA[Yep, this is a dummy&#8217;s reference&#8230; I keep on forgetting the syntax so I might as well put it here for my own reference&#8230; vi is the one, if not the most popular text editor available for a System Administrator on a UNIX and UNIX-like machines. It has two modes, command and editor mode. Here &#8230; <a href="http://www.sysadmindayph.com/blog/vi-search-and-replace-the-basics-dummys-reference/">Continue reading</a>]]></description>
			<content:encoded><![CDATA[<p>Yep, this is a dummy&#8217;s reference&#8230; I keep on forgetting the syntax so I might as well put it here for my own reference&#8230; <img src='http://www.sysadmindayph.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>vi is the one, if not the most popular text editor available for a System Administrator on a UNIX and UNIX-like machines.</p>
<p>It has two modes, command and editor mode.</p>
<p>Here are some syntax in using the Search and Replace in &#8216;vi&#8217;.</p>
<p>Search:</p>
<p>The most basic and most easily remembered command for searching is vi is <em>slash </em>or &#8216;/&#8217; followed by the character being searched. That&#8217;s for forward searching. For backward, vi use &#8216;?&#8217; followed by the string being searched.</p>
<p>To go to the next occurrance of the string being searched, vi use &#8216;n&#8217; command. Doesn&#8217;t matter if your searching forward (from up, down) or backward, from down to top.</p>
<p>Example:</p>
<p>(you have to be in command mode&#8230; press ESC first)</p>
<p>/<em>search_string</em></p>
<p>?<em>search_string</em></p>
<p><strong>Search and Replace</strong></p>
<p>For search and replace, use the syntax</p>
<p>:%s/original/replaced/g</p>
<p>Make sense?<br />
Any command that begins with a &#8220;<tt>:</tt>&#8221; is called a line mode command and performs its duty on the line the cursor is currently on.</p>
<p>The above syntax serves my purpose now&#8230; If I want to replace text in certain ranges.. <a href="http://unix.t-a-y-l-o-r.com/VBsr.html">syntax can be found here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sysadmindayph.com/blog/vi-search-and-replace-the-basics-dummys-reference/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>About the /proc and -xdev parameter for &#8216;find&#8217;</title>
		<link>http://www.sysadmindayph.com/blog/about-the-proc-and-xdev-parameter-for-find/</link>
		<comments>http://www.sysadmindayph.com/blog/about-the-proc-and-xdev-parameter-for-find/#comments</comments>
		<pubDate>Tue, 20 Nov 2007 01:54:35 +0000</pubDate>
		<dc:creator>elizar</dc:creator>
				<category><![CDATA[Commands]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.sysadmindayph.com/blog/about-the-proc-and-xdev-parameter-for-find/</guid>
		<description><![CDATA[/proc is a pseudo-filesystem used to access process information from the kernel. It doesn&#8217;t use any storage space and uses little memory. On Linux, you can sometimes make modifications to the running kernel by modifying &#8220;files&#8221; in /proc. If / is full, run a command similar to the following to sort all files in the &#8230; <a href="http://www.sysadmindayph.com/blog/about-the-proc-and-xdev-parameter-for-find/">Continue reading</a>]]></description>
			<content:encoded><![CDATA[<p>/proc is a pseudo-filesystem used to access process information from the kernel. It doesn&#8217;t use any storage space and uses little memory. On Linux, you can sometimes make modifications to the running kernel by modifying &#8220;files&#8221; in /proc.</p>
<p>If / is full, run a command similar to the following to sort all files in the / file system by size:</p>
<blockquote><p>find / -xdev -ls | sort -n -k 7</p></blockquote>
<p>&#8220;-xdev&#8221; limits the find command to the root file system.</p>
<p>This will only look for files found in the root and will not includes those partitions that are defined in /etc/vfstab | /etc/fstab file, those listed when `df -k` is executed:</p>
<blockquote><p>/dev/md/dsk/d0       2058319 1016097  980473    51%    /<br />
/dev/md/dsk/d3       2058319 1801793  194777    91%    /var<br />
etc .. etc..</p></blockquote>
<p>Thanks Brandon!</p>
<blockquote></blockquote>
<p><em><a href="http://www.brandonhutchinson.com/">Brandon H</a>. &#8211;  Senior UNIX Systems Engineer for an application services provider in Minneapolis, MN.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sysadmindayph.com/blog/about-the-proc-and-xdev-parameter-for-find/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Difference Between NFS, DNS, NIS+, and NIS</title>
		<link>http://www.sysadmindayph.com/blog/difference-between-nfs-dns-nis-and-nis/</link>
		<comments>http://www.sysadmindayph.com/blog/difference-between-nfs-dns-nis-and-nis/#comments</comments>
		<pubDate>Sun, 11 Nov 2007 09:57:58 +0000</pubDate>
		<dc:creator>elizar</dc:creator>
				<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.sysadmindayph.com/blog/difference-between-nfs-dns-nis-and-nis/</guid>
		<description><![CDATA[NFS, DNS, NIS and NIS+&#8230; that&#8217;s a lot of acronyms! Network File System NFS is Sun&#8217;s Networked File System, and by now, more or less, the de facto method of sharing file systems between computers. Domain Name Service DNS is the Domain Name Service, which is the way information about hostnames and addresses are shared &#8230; <a href="http://www.sysadmindayph.com/blog/difference-between-nfs-dns-nis-and-nis/">Continue reading</a>]]></description>
			<content:encoded><![CDATA[<p>NFS, DNS, NIS and NIS+&#8230; that&#8217;s a lot of acronyms!</p>
<p><strong>Network File System</strong></p>
<p>NFS is Sun&#8217;s Networked File System, and by now, more or less, the de facto method of sharing file systems between computers.</p>
<p><strong>Domain Name Service</strong></p>
<p>DNS is the Domain Name Service, which is the way information about hostnames and addresses are shared across the Intenet.</p>
<p><strong>Network Information (Name) Service</strong></p>
<p>NIS stands for Network Information Name Service. It was original called Yellow Pages, which is why many of the commands for NIS start with yp (such as <strong>ypbind</strong>, <strong>ypcat</strong>, etc.) NIS was developed by Sun, and is, like NFS, more or less the default way of sharing system information between UNIX machines.</p>
<p><strong>NIS+</strong></p>
<p>NIS+ is Sun&#8217;s re-implementation of NIS. It attempts to address some of the problems with NIS, but the implementers of NIS+ have made a series of bad choices in the design of NIS+, so it has seen only limited usage compared to the other types of services you asked about.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sysadmindayph.com/blog/difference-between-nfs-dns-nis-and-nis/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>UNIX Quick Tip: Changing The Time Stamp Of A File</title>
		<link>http://www.sysadmindayph.com/blog/unix-quick-tip-changing-the-time-stamp-of-a-file/</link>
		<comments>http://www.sysadmindayph.com/blog/unix-quick-tip-changing-the-time-stamp-of-a-file/#comments</comments>
		<pubDate>Thu, 01 Nov 2007 15:28:56 +0000</pubDate>
		<dc:creator>elizar</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.sysadmindayph.com/blog/unix-quick-tip-changing-the-time-stamp-of-a-file/</guid>
		<description><![CDATA[This tip is a give away. Everyone knows this, but for those who doesn&#8217;t or forgot&#8230;  here&#8217;s refresher&#8230; Here&#8217;s a typical output of a file listing using `ls -l` on a directory: [root@unix-box icons]# ls -l &#124; more total 636 -rw-r&#8211;r&#8211;    1 elizar root          246 Aug 26  2005 a.gif -rw-r&#8211;r&#8211;    1 elizar root          242 Aug &#8230; <a href="http://www.sysadmindayph.com/blog/unix-quick-tip-changing-the-time-stamp-of-a-file/">Continue reading</a>]]></description>
			<content:encoded><![CDATA[<p>This tip is a give away. Everyone knows this, but for those who doesn&#8217;t or forgot&#8230;  here&#8217;s refresher&#8230;</p>
<p>Here&#8217;s a typical output of a file listing using `ls -l` on a directory:</p>
<blockquote><p>[root@unix-box icons]# ls -l | more<br />
total 636<br />
-rw-r&#8211;r&#8211;    1 elizar root          246 Aug 26  2005 a.gif<br />
-rw-r&#8211;r&#8211;    1 elizar root          242 Aug 26  2005 alert.black.gif<br />
-rw-r&#8211;r&#8211;    1 elizar root          279 Aug 26  2005 alert.black.png<br />
-rw-r&#8211;r&#8211;    1 elizar root          247 Aug 26  2005 alert.red.gif<br />
-rw-r&#8211;r&#8211;    1 elizar root          298 Aug 26  2005 alert.red.png<br />
-rw-r&#8211;r&#8211;    1 elizar root         2326 Aug 26  2005 apache_pb.gif<br />
-rw-r&#8211;r&#8211;    1 elizar root         1385 Aug 26  2005 apache_pb.png<br />
-rw-r&#8211;r&#8211;    1 elizar root          293 Aug 26  2005 a.png</p></blockquote>
<p>When using the -l (dash &#8216;el&#8217;) option of ls, the output will display a more detailed listing of the files. Here you&#8217;ll see the file properties/permission (-rw-r&#8211;r&#8211;) the number of links, the owner of the file, the group of the user, file size, the date/time stamp and finally the file name. That&#8217;s 7 column.</p>
<p><strong>Changing The Time Stamp Of A File</strong></p>
<p>To change the time stamp of a file (the 6th column in the `ls -l` listing), we use the UNIX command <strong>touch</strong>.</p>
<p>From the Man Pag:</p>
<blockquote><p>NAME<br />
touch &#8211; change file timestamps</p>
<p>SYNOPSIS<br />
touch [OPTION]&#8230; FILE&#8230;<br />
touch [-acm] MMDDhhmm[YY] FILE&#8230; (obsolescent)</p></blockquote>
<p>There are many options for the <em>touch </em>command, but the one I use fairly often is the -t option</p>
<blockquote><p>       -t STAMP;    use [[CC]YY]MMDDhhmm[.ss]</p></blockquote>
<p>Example:</p>
<blockquote><p> [root@unix-box icons]#  touch -t 200607161201 a.gif<br />
[root@unix-box icons]# ls -l | more<br />
total 636<br />
-rw-r&#8211;r&#8211;    1 elizar root          246 Jul 16  2006 a.gif<br />
-rw-r&#8211;r&#8211;    1 elizar root          242 Aug 26  2005 alert.black.gif</p></blockquote>
<p>Other options that you  may find useful are -a (change access time only) -m (modification time only) and others. Consult the man page for more details</p>
<p>Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sysadmindayph.com/blog/unix-quick-tip-changing-the-time-stamp-of-a-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

