<?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>Ask me Questions and get Answers ! &#187; unix</title>
	<atom:link href="http://askmetoo.com/category/unix/feed" rel="self" type="application/rss+xml" />
	<link>http://askmetoo.com</link>
	<description>Ask Questions and get Answers About everything for free!</description>
	<lastBuildDate>Wed, 21 Dec 2011 08:04:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Analyse Logging commands for debian linux</title>
		<link>http://askmetoo.com/analyse-logging-commands-for-debian-linux.htm</link>
		<comments>http://askmetoo.com/analyse-logging-commands-for-debian-linux.htm#comments</comments>
		<pubDate>Fri, 23 Sep 2011 18:27:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Debian 5]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[Unix-Linux]]></category>

		<guid isPermaLink="false">http://askmetoo.com/?p=241</guid>
		<description><![CDATA[http://stackoverflow.com/questions/473998/tool-or-language-to-count-occurrances-of-errors-in-a-log-file http://www.thinkplexx.com/learn/article/webperf/baslog/statwithbashandawk awk &#8216;{print $1}&#8217; access.log&#124;sort -u awk &#8216;{print $2}&#8217; access.log&#124;sort -u awk &#8216;{print $3}&#8217; access.log&#124;sort -u The awk filters out all IP addresses, the sort then removes duplicates. To find out all accesses to a URL, I do grep URL access.log]]></description>
			<content:encoded><![CDATA[<p>http://stackoverflow.com/questions/473998/tool-or-language-to-count-occurrances-of-errors-in-a-log-file</p>
<p><span id="more-241"></span></p>
<p>http://www.thinkplexx.com/learn/article/webperf/baslog/statwithbashandawk</p>
<p>awk &#8216;{print $1}&#8217; access.log|sort -u<br />
awk &#8216;{print $2}&#8217; access.log|sort -u<br />
awk &#8216;{print $3}&#8217; access.log|sort -u</p>
<p>The awk filters out all IP addresses, the sort then removes duplicates.</p>
<p>To find out all accesses to a URL, I do</p>
<p>grep URL access.log</p>
]]></content:encoded>
			<wfw:commentRss>http://askmetoo.com/analyse-logging-commands-for-debian-linux.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>putty port tunneling from command line</title>
		<link>http://askmetoo.com/putty-port-tunneling-from-command-line.htm</link>
		<comments>http://askmetoo.com/putty-port-tunneling-from-command-line.htm#comments</comments>
		<pubDate>Wed, 23 Mar 2011 12:04:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[unix]]></category>
		<category><![CDATA[Unix-Linux]]></category>

		<guid isPermaLink="false">http://askmetoo.com/?p=216</guid>
		<description><![CDATA[use this command in console ssh -L 8080:127.0.0.1:80 username@router.dyndns.org:port]]></description>
			<content:encoded><![CDATA[<p><img src="http://thedaneshproject.com/wp-content/uploads/2007/03/ssh-tunnelling.jpg" alt="" /><br />
<span id="more-216"></span><br />
use this command in console<br />
ssh -L 8080:127.0.0.1:80 username@router.dyndns.org:port  </p>
]]></content:encoded>
			<wfw:commentRss>http://askmetoo.com/putty-port-tunneling-from-command-line.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dovecot postfix SSL. How to create a self-signed Certificate ?</title>
		<link>http://askmetoo.com/dovecot-postfix-ssl-how-to-create-a-self-signed-certificate.htm</link>
		<comments>http://askmetoo.com/dovecot-postfix-ssl-how-to-create-a-self-signed-certificate.htm#comments</comments>
		<pubDate>Wed, 02 Feb 2011 09:44:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Debian 5]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://askmetoo.com/?p=194</guid>
		<description><![CDATA[We will create a self-signed Certificate ! In Dovecot postfix SSL. Default for Virtualmin in DEBIAN 5 error &#8211; logging 1 2 3 egrep '(warning&#124;error&#124;fatal&#124;panic):' /var/log/mail.log &#124; more &#160; Jan 30 05:27:02 Debian-50-lenny-64-minimal dovecot: pop3-login: Can't load private key file /etc/ssl/private/dovecot.pem: error:0B080074:x509 certificate routines:X509_ To fix this? you neet to create new SSL cert 1) [...]]]></description>
			<content:encoded><![CDATA[<p>We will create a self-signed Certificate !<br />
 In<strong> Dovecot postfix SSL</strong>.<br />
Default for <strong>Virtualmin in DEBIAN 5</strong><br />
error &#8211; logging</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="bach" style="font-family:monospace;">egrep '(warning|error|fatal|panic):' /var/log/mail.log | more
&nbsp;
Jan 30 05:27:02 Debian-50-lenny-64-minimal dovecot: pop3-login: Can't load private key file /etc/ssl/private/dovecot.pem: error:0B080074:x509 certificate routines:X509_</pre></td></tr></table></div>

<p><span id="more-194"></span></p>
<p>To fix this? you neet to create new SSL cert<br />
1) Check pem and key file location</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="bach" style="font-family:monospace;">&nbsp;
grep 'smtpd_tls_.*_file' /etc/postfix/main.cf
grep 'ssl.*_file' /etc/dovecot/dovecot.conf
&nbsp;
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
ssl_cert_file = /etc/ssl/certs/dovecot.pem
ssl_key_file = /etc/ssl/private/dovecot.pem
#ssl_ca_file =</pre></td></tr></table></div>

<p>2) ################<br />
RUN COMMANDS<br />
################</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="bach" style="font-family:monospace;">openssl genrsa -out server.key 1024
openssl req -new -x509 -key server.key -out server.pem -days 1826
mv server.pem /etc/ssl/certs/ssl-cert-snakeoil.pem
mv server.key /etc/ssl/private/ssl-cert-snakeoil.key
/etc/init.d/dovecot restart
&nbsp;
openssl req -new -x509 -days 3650 -nodes -out /etc/ssl/certs/dovecot.pem \
-keyout /etc/ssl/private/dovecot.pem
/etc/init.d/dovecot restart
/etc/init.d/postfix restart</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://askmetoo.com/dovecot-postfix-ssl-how-to-create-a-self-signed-certificate.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>eaccelerator remove cache</title>
		<link>http://askmetoo.com/eaccelerator-remove-cache.htm</link>
		<comments>http://askmetoo.com/eaccelerator-remove-cache.htm#comments</comments>
		<pubDate>Mon, 03 Jan 2011 15:46:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[unix]]></category>
		<category><![CDATA[Unix-Linux]]></category>

		<guid isPermaLink="false">http://askmetoo.com/?p=185</guid>
		<description><![CDATA[1 rm -rf /var/cache/eaccelerator/*;]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bach" style="font-family:monospace;">rm -rf /var/cache/eaccelerator/*;</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://askmetoo.com/eaccelerator-remove-cache.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to remove clamav in DEBIAN ?</title>
		<link>http://askmetoo.com/how-to-remove-clamav-in-debian.htm</link>
		<comments>http://askmetoo.com/how-to-remove-clamav-in-debian.htm#comments</comments>
		<pubDate>Wed, 01 Dec 2010 10:11:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[unix]]></category>
		<category><![CDATA[Unix-Linux]]></category>

		<guid isPermaLink="false">http://askmetoo.com/?p=178</guid>
		<description><![CDATA[simple apt-get remove clamav-base -f -y]]></description>
			<content:encoded><![CDATA[<p>simple<br />
<span id="more-178"></span></p>
<p>apt-get remove clamav-base  -f -y</p>
]]></content:encoded>
			<wfw:commentRss>http://askmetoo.com/how-to-remove-clamav-in-debian.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Clear Debian cache on webserver ?</title>
		<link>http://askmetoo.com/how-to-clear-debian-cache-on-webserver.htm</link>
		<comments>http://askmetoo.com/how-to-clear-debian-cache-on-webserver.htm#comments</comments>
		<pubDate>Thu, 10 Jun 2010 07:17:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://askmetoo.com/?p=156</guid>
		<description><![CDATA[rm -r /var/log/apache2 rm -r /var/cache/eaccelerator rm -r /root/Maildir rm -r /home/internetfastnews/Maildir rm -r /home/zxnews/Maildir rm -r /home/seoch/Maildir rm -r /home/otvetish/Maildir rm -r /home/teaseo/Maildir rm -r /home/school/Maildir]]></description>
			<content:encoded><![CDATA[<p>rm -r  /var/log/apache2<br />
rm -r /var/cache/eaccelerator<br />
rm -r /root/Maildir<br />
rm -r /home/internetfastnews/Maildir<br />
rm -r /home/zxnews/Maildir<br />
rm -r /home/seoch/Maildir<br />
rm -r /home/otvetish/Maildir<br />
rm -r /home/teaseo/Maildir<br />
rm -r /home/school/Maildir</p>
]]></content:encoded>
			<wfw:commentRss>http://askmetoo.com/how-to-clear-debian-cache-on-webserver.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Secure server backup (ftp + openssh+encode) !</title>
		<link>http://askmetoo.com/encoded-backup.htm</link>
		<comments>http://askmetoo.com/encoded-backup.htm#comments</comments>
		<pubDate>Tue, 12 Jan 2010 16:13:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://askmetoo.com/?p=139</guid>
		<description><![CDATA[Secure server backup logic 1) find all buckup files *.gz 2) encode them to *.gz.out 3) remove gz file 4) upload to ftp 5) remove encoded file Secure server backup script 1 2 3 4 5 6 7 8 9 10 11 #!/bin/sh BACKUPDATE=`date +%Y-%m-%d`; find . -type f -name &#34;*.gz&#34; -print&#124;while read myfile do [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Secure server backup logic</strong><br />
1) find all buckup files  *.gz<br />
2) encode them to *.gz.out<br />
3) remove  gz file<br />
4) upload to ftp<br />
5) remove encoded file</p>
<p><strong>Secure server backup script</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="bach" style="font-family:monospace;">#!/bin/sh
BACKUPDATE=`date +%Y-%m-%d`;
find . -type f -name &quot;*.gz&quot; -print|while read myfile
do
    openssl enc -aes-256-cbc -salt -in &quot;$myfile&quot; -out &quot;$myfile&quot;.out -pass pass:PaSSwordThere;
    rm &quot;$myfile&quot; ;
    curl -v -T &quot;$myfile&quot;.out ftp://login:&quot;FTppassThere&quot;@ftpserveraddres.com/${BACKUPDATE}/&quot;$myfile&quot; -Q &quot;MKD ${BACKUPDATE}&quot;;
   curl -v -T &quot;$myfile&quot;.out ftp://login:&quot;FTppassThere&quot;@ftpserveraddres.com/${BACKUPDATE}/&quot;$myfile&quot; ;
    rm &quot;$myfile&quot;.out ;
    echo &quot;$myfile&quot; &quot;\n&quot; ;
done</pre></td></tr></table></div>

<p><strong>This is my first backup script!</strong></p>
<p>Also decode example<br />
<strong>openssl  enc -d -aes-256-cbc -in zzzz.gz.out -out zzzz.gz -pass pass:PaSSwordThere;</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://askmetoo.com/encoded-backup.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

