<?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>fabiolagana.net &#187; Shell</title>
	<atom:link href="http://blog.fabiolagana.net/category/linux/shell/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.fabiolagana.net</link>
	<description>640 Kb should be enough memory for anybody</description>
	<lastBuildDate>Mon, 26 Oct 2009 13:17:04 +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>Spamhaus droplist</title>
		<link>http://blog.fabiolagana.net/spamhaus-droplist/</link>
		<comments>http://blog.fabiolagana.net/spamhaus-droplist/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 07:55:39 +0000</pubDate>
		<dc:creator>Fabio Laganà</dc:creator>
				<category><![CDATA[bash]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[droplist]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[sed]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[spamhaus]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.fabiolagana.net/?p=148</guid>
		<description><![CDATA[&#160;Powered by Max Banner Ads&#160; #!/bin/bash &#160; #Script to add firewall rules to a linux system to completely block #all traffic to and from networks in the spamhaus drop list. &#160; #Copyright 2009, William Stearns, wstearns@pobox.com #Released under the GPL. This and other tools can be found at #http://www.stearns.org/ &#160; #Sole (optional) command line parameter [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_codebox"><table><tr id="p1482"><td class="code" id="p148code2"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#Script to add firewall rules to a linux system to completely block</span>
<span style="color: #666666; font-style: italic;">#all traffic to and from networks in the spamhaus drop list.</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#Copyright 2009, William Stearns, wstearns@pobox.com</span>
<span style="color: #666666; font-style: italic;">#Released under the GPL.  This and other tools can be found at</span>
<span style="color: #666666; font-style: italic;">#http://www.stearns.org/</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#Sole (optional) command line parameter is the file location of the</span>
<span style="color: #666666; font-style: italic;">#drop list, such as:</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#cd /var/lib/</span>
<span style="color: #666666; font-style: italic;">#wget http://www.spamhaus.org/drop/drop.lasso</span>
<span style="color: #666666; font-style: italic;"># ./spamhaus-drop /var/lib/drop.lasso</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#While the DROP file should be regularly updated, this should</span>
<span style="color: #666666; font-style: italic;">#probably be about once per day or less frequently; do _not_</span>
<span style="color: #666666; font-style: italic;">#download DROP more than once an hour.</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #007800;">DropList</span>=<span style="color: #ff0000;">&quot;$1&quot;</span>
<span style="color: #000000; font-weight: bold;">else</span>
	<span style="color: #007800;">DropList</span>=<span style="color: #ff0000;">&quot;./drop.lasso&quot;</span>
<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-s</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$DropList</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Unable to find drop list file <span style="color: #007800;">$DropList</span> .  Perhaps do:&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">2</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;wget http://www.spamhaus.org/drop/drop.lasso -O <span style="color: #007800;">$DropList</span>&quot;</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;exiting.&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">2</span>
	<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-x</span> <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Missing iptables command line tool, exiting.&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">2</span>
	<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$DropList</span>&quot;</span> \
 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/;.*//'</span> \
 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-v</span> <span style="color: #ff0000;">'^ *$'</span> \
 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #c20cb9; font-weight: bold;">read</span> OneNetBlock ; <span style="color: #000000; font-weight: bold;">do</span>
	<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-I</span> INPUT <span style="color: #660033;">-s</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$OneNetBlock</span>&quot;</span> <span style="color: #660033;">-j</span> DROP
	<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-I</span> OUTPUT <span style="color: #660033;">-d</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$OneNetBlock</span>&quot;</span> <span style="color: #660033;">-j</span> DROP
	<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-I</span> FORWARD <span style="color: #660033;">-s</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$OneNetBlock</span>&quot;</span> <span style="color: #660033;">-j</span> DROP
	<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-I</span> FORWARD <span style="color: #660033;">-d</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$OneNetBlock</span>&quot;</span> <span style="color: #660033;">-j</span> DROP
<span style="color: #000000; font-weight: bold;">done</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.fabiolagana.net/spamhaus-droplist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eseguire il backup delle directory di un server</title>
		<link>http://blog.fabiolagana.net/eseguire-backup-directory-server/</link>
		<comments>http://blog.fabiolagana.net/eseguire-backup-directory-server/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 08:01:22 +0000</pubDate>
		<dc:creator>Fabio Laganà</dc:creator>
				<category><![CDATA[backup]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[hosts]]></category>
		<category><![CDATA[ip]]></category>

		<guid isPermaLink="false">http://blog.fabiolagana.net/?p=129</guid>
		<description><![CDATA[nome script: /usr/local/sbin/backup_dir.sh

descrizione: Con questo script viene fatto il backup delle directory importanti server

Inserendo una riga simile nel cron scheduliamo il backup tutte le notti]]></description>
			<content:encoded><![CDATA[<p>nome script: /usr/local/sbin/backup_dir.sh</p>
<p>descrizione: Con questo script viene fatto il backup delle directory importanti  server</p>
<p>Inserendo una riga simile nel cron scheduliamo il backup tutte le notti</p>
<pre id="area">cat /etc/cron.d/backup
MAILTO="postmaster@yourdomain.com"
00 21 * * * root test -x /usr/local/sbin/backup_dir.sh &#038;&#038; /usr/local/sbin/backup_dir.sh</pre>

<div class="wp_codebox"><table><tr id="p1293"><td class="code" id="p129code3"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># backup_dir.sh</span>
<span style="color: #666666; font-style: italic;"># Con questo script viene fatto il backup delle directory importanti  server</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #007800;">hosts_internal</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span> your_host <span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">for</span> host <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #800000;">${hosts_internal[@]}</span>
<span style="color: #000000; font-weight: bold;">do</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Download of /etc/ /usr/local/sbin/ /root/ /home/ directory from &quot;</span><span style="color: #007800;">$host</span><span style="color: #ff0000;">&quot; &quot;</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;Starting ------&gt;&quot;</span>
  <span style="color: #c20cb9; font-weight: bold;">date</span>
  <span style="color: #666666; font-style: italic;"># bakup file for hosts</span>
  <span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-zcvf</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>backups<span style="color: #000000; font-weight: bold;">/</span>backup_files_<span style="color: #ff0000;">&quot;<span style="color: #007800;">$host</span>&quot;</span>_<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #ff0000;">&quot;%d%m%Y&quot;</span><span style="color: #000000; font-weight: bold;">`</span>.tar.gz <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span> ;
  <span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>backups<span style="color: #000000; font-weight: bold;">/</span>backup_files_<span style="color: #ff0000;">&quot;<span style="color: #007800;">$host</span>&quot;</span>_<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #ff0000;">&quot;%d%m%Y&quot;</span><span style="color: #000000; font-weight: bold;">`</span>.tar.gz <span style="color: #000000; font-weight: bold;">/</span>backups<span style="color: #000000; font-weight: bold;">/</span><span style="color: #ff0000;">&quot;<span style="color: #007800;">$host</span>&quot;</span><span style="color: #000000; font-weight: bold;">/</span>;
  <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>backups<span style="color: #000000; font-weight: bold;">/</span>backup_files_<span style="color: #ff0000;">&quot;<span style="color: #007800;">$host</span>&quot;</span>_<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #ff0000;">&quot;%d%m%Y&quot;</span><span style="color: #000000; font-weight: bold;">`</span>.tar.gz
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;Stopping ------&gt;&quot;</span>
  <span style="color: #c20cb9; font-weight: bold;">date</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;&quot;</span>
<span style="color: #000000; font-weight: bold;">done</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.fabiolagana.net/eseguire-backup-directory-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Count domain in mail.log (Qmail)</title>
		<link>http://blog.fabiolagana.net/count-domain-maillog-qmail/</link>
		<comments>http://blog.fabiolagana.net/count-domain-maillog-qmail/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 05:34:56 +0000</pubDate>
		<dc:creator>Fabio Laganà</dc:creator>
				<category><![CDATA[awk]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Mailserver]]></category>
		<category><![CDATA[Qmail]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[mail.log]]></category>

		<guid isPermaLink="false">http://blog.fabiolagana.net/?p=116</guid>
		<description><![CDATA[# cat /usr/local/sbin/count_mail_per_domain.sh #!/bin/bash logfile=$2 domain=$3 &#160; case &#34;$1&#34; in -t&#41; cat $logfile &#124;grep &#34;to remote&#34; &#124; awk '{print $14}' &#124; awk -F@ '{ field = $2 }; {print &#34;domain: &#34; field }' &#124; sort &#124;uniq -c &#124;sort -nr &#124; awk -v totale=0 '{totale=totale+$1; print ;} END {print &#34;Totale giorno domini: &#34;totale;}' ;; &#160; -su&#41; [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_codebox"><table><tr id="p1165"><td class="code" id="p116code5"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># cat /usr/local/sbin/count_mail_per_domain.sh</span>
<span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #007800;">logfile</span>=<span style="color: #007800;">$2</span>
<span style="color: #007800;">domain</span>=<span style="color: #007800;">$3</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #000000; font-weight: bold;">in</span>
        -t<span style="color: #7a0874; font-weight: bold;">&#41;</span>
	<span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #007800;">$logfile</span> <span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #ff0000;">&quot;to remote&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $14}'</span>
					<span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> -F<span style="color: #000000; font-weight: bold;">@</span> <span style="color: #ff0000;">'{ field = $2 }; {print &quot;domain: &quot; field }'</span>
					<span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sort</span> <span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">uniq</span> <span style="color: #660033;">-c</span> <span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">sort</span> <span style="color: #660033;">-nr</span>
					<span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #660033;">-v</span> <span style="color: #007800;">totale</span>=<span style="color: #000000;">0</span> <span style="color: #ff0000;">'{totale=totale+$1; print ;} END {print &quot;Totale giorno domini: &quot;totale;}'</span>
            <span style="color: #000000; font-weight: bold;">;;</span>
&nbsp;
        -su<span style="color: #7a0874; font-weight: bold;">&#41;</span>
	<span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #007800;">$logfile</span> <span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #ff0000;">&quot;to remote&quot;</span>  <span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-i</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$domain</span>&quot;</span>
					<span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">' { field = $14 }; {print &quot;to remote: &quot; field }'</span>
					<span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sort</span><span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">uniq</span> -c<span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sort</span> <span style="color: #660033;">-nr</span>
					<span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #660033;">-v</span> <span style="color: #007800;">totale</span>=<span style="color: #000000;">0</span> <span style="color: #ff0000;">'{totale=totale+$1; print ;} END {print &quot;Totale giorno domini per utente: &quot;totale;}'</span>
            <span style="color: #000000; font-weight: bold;">;;</span>
	-s<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        <span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #007800;">$logfile</span> <span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #ff0000;">&quot;to remote&quot;</span>  <span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-i</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$domain</span>&quot;</span> <span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $14}'</span>
                                        <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> -F<span style="color: #000000; font-weight: bold;">@</span> <span style="color: #ff0000;">'{ field = $2 }; {print &quot;to remote domain: &quot; field }'</span>
                                        <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sort</span><span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">uniq</span> -c<span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sort</span> <span style="color: #660033;">-nr</span>
                                        <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #660033;">-v</span> <span style="color: #007800;">totale</span>=<span style="color: #000000;">0</span> <span style="color: #ff0000;">'{totale=totale+$1; print ;} END {print &quot;Totale giorno domini: &quot;totale;}'</span>
&nbsp;
         <span style="color: #000000; font-weight: bold;">;;</span>
        <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
            <span style="color: #7a0874; font-weight: bold;">echo</span> $<span style="color: #ff0000;">&quot;Usage: $0 { -t /var/log/mail.log.0 }  for print total mail for domain &quot;</span>
            <span style="color: #7a0874; font-weight: bold;">echo</span> $<span style="color: #ff0000;">&quot;Usage: $0 { -su /var/log/mail.log.0 domain.com } for print total mail for single domain per user&quot;</span>
            <span style="color: #7a0874; font-weight: bold;">echo</span> $<span style="color: #ff0000;">&quot;Usage: $0 { -s /var/log/mail.log.0 domain.com } for print total mail for single domain&quot;</span>
            <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">esac</span></pre></td></tr></table></div>

<p>for more tips visit <a title="qmail relay to smarthost" href="http://www.nixtips.net/qmail-relay-to-smarthost/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.nixtips.net/qmail-relay-to-smarthost/?referer=');">qmail relay to smarthost</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabiolagana.net/count-domain-maillog-qmail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add and Remove ip alias into OpenBSD System</title>
		<link>http://blog.fabiolagana.net/add-remove-ip-alias-openbsd-system/</link>
		<comments>http://blog.fabiolagana.net/add-remove-ip-alias-openbsd-system/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 08:26:42 +0000</pubDate>
		<dc:creator>Fabio Laganà</dc:creator>
				<category><![CDATA[OpenBSD]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[add]]></category>
		<category><![CDATA[alias]]></category>
		<category><![CDATA[ip]]></category>
		<category><![CDATA[remove]]></category>

		<guid isPermaLink="false">http://blog.fabiolagana.net/?p=111</guid>
		<description><![CDATA[Set an IP Alias To put a second IP address to the same interface, just enter on the commandline as root: OpenBSD# ifconfig re0 inet alias 192.168.10.199 netmask 255.255.255.0 This sets an IP address 192.168.10.199 to vr0. Check again with ifconfig: OpenBSD# ifconfig -A lo0: flags=8049 mtu 33208 groups: lo inet 127.0.0.1 netmask 0xff000000 inet6 [...]]]></description>
			<content:encoded><![CDATA[<p><a name="D02"></a></p>
<h2><a name="D02">Set an IP Alias</a></h2>
<p>To put a second IP address to the same interface, just enter on the commandline as root:</p>
<pre id="area"> <tt>OpenBSD#</tt> <strong>ifconfig re0 inet alias 192.168.10.199 netmask 255.255.255.0</strong></pre>
<p>This sets an IP address <strong>192.168.10.199</strong> to <tt>vr0</tt>. Check again with ifconfig:</p>
<pre id="area"> <tt>OpenBSD#</tt> <strong>ifconfig -A</strong>
 lo0: flags=8049 mtu 33208
         groups: lo
         inet 127.0.0.1 netmask 0xff000000
         inet6 ::1 prefixlen 128
         inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
 re0: flags=8843 mtu 1500
         lladdr 00:40:45:28:89:37
         groups: egress
         media: Ethernet autoselect (100baseTX full-duplex)
         status: active
         inet <strong>192.168.1.199</strong> netmask 0xffffff00 broadcast 192.168.1.255
         inet6 fe80::240:45ff:fe28:8937%vr0 prefixlen 64 scopeid 0x2
         inet <strong>192.168.10.199</strong> netmask 0xffffff00 broadcast 192.168.100.255</pre>
<p>Now we see two IP addresses on <tt>vr0</tt>. If you want to set an IP address within the same network you would have to set a fake netmask of <strong>255.255.255.255</strong>.<a name="C03"> </a><a name="D03"></a></p>
<h2><a name="D03">Make the IP Alias Permanent</a></h2>
<p>If you use <tt>ifconfig</tt> to set an IP alias, the alias won&#8217;t be present after the next reboot. To make the setting permanent, add a line to <tt>/etc/hostname.<em>&lt;INTERFACE&gt;</em></tt>:</p>
<pre id="area"> <tt>OpenBSD#</tt> <strong>vi /etc/hostname.vr0</strong>
 inet 192.168.1.199 255.255.255.0 NONE
         <strong>inet alias 192.168.10.199 255.255.255.0</strong></pre>
<p><a name="C04"></a></p>
<h2><a name="C04">Remove an IP Alias</a></h2>
<p>You can remove an IP alias with a comand like this:</p>
<pre id="area"> <tt>OpenBSD#</tt> <strong>ifconfig re0 192.168.10.199 delete</strong></pre>
<p>This deletes the second IP address from the interface keeping the first.</p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabiolagana.net/add-remove-ip-alias-openbsd-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Da immagine a disco via rete con netcat</title>
		<link>http://blog.fabiolagana.net/immagine-disc-from-network-netcat/</link>
		<comments>http://blog.fabiolagana.net/immagine-disc-from-network-netcat/#comments</comments>
		<pubDate>Thu, 04 Sep 2008 07:42:33 +0000</pubDate>
		<dc:creator>Fabio Laganà</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[netcat]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[dd]]></category>
		<category><![CDATA[zcat]]></category>

		<guid isPermaLink="false">http://blog.fabiolagana.net/?p=60</guid>
		<description><![CDATA[sul target host partire con una LIVE linux e mettere netcat in ascolto in questo modo&#8230; netcat -l -p 1234 &#124; dd of=/dev/sda bs=16065b sul master (dove risiede l&#8217;immagine gzippata) zcat immagine.gz &#124; netcat 192.168.1.1 1234]]></description>
			<content:encoded><![CDATA[<p>sul target host partire con una LIVE linux e mettere netcat in ascolto in questo modo&#8230;</p>

<div class="wp_codebox"><table><tr id="p608"><td class="code" id="p60code8"><pre class="bash" style="font-family:monospace;">  netcat <span style="color: #660033;">-l</span> <span style="color: #660033;">-p</span> <span style="color: #000000;">1234</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">dd</span> <span style="color: #007800;">of</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda <span style="color: #007800;">bs</span>=16065b</pre></td></tr></table></div>

<p>sul master (dove risiede l&#8217;immagine gzippata)</p>

<div class="wp_codebox"><table><tr id="p609"><td class="code" id="p60code9"><pre class="bash" style="font-family:monospace;">  <span style="color: #c20cb9; font-weight: bold;">zcat</span> immagine.gz <span style="color: #000000; font-weight: bold;">|</span> netcat 192.168.1.1 <span style="color: #000000;">1234</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.fabiolagana.net/immagine-disc-from-network-netcat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bash script for checking mysql problem by reading daemon.log</title>
		<link>http://blog.fabiolagana.net/bash-script-checking-mysql-problem-by-reading-daemonlog/</link>
		<comments>http://blog.fabiolagana.net/bash-script-checking-mysql-problem-by-reading-daemonlog/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 21:27:34 +0000</pubDate>
		<dc:creator>Fabio Laganà</dc:creator>
				<category><![CDATA[bash]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[daemon.log]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://blog.fabiolagana.net/?p=48</guid>
		<description><![CDATA[#!/bin/bash &#160; ### Checking del daemon.log per eventuali problemi sul DB MySQL # rel. 0.3 - 01 Agosto 2008 &#160; # time_to_check_min=`date +&#34;%b %d %k:%M&#34; -d &#34;-1 min&#34;` # time_to_check_hour=`date +&#34;%b %d %k:%M&#34; -d &#34;-1 hour&#34;` file_to_check=/var/log/daemon.log tmp_file=/tmp/info.tmp.01.$$ tmp_file1=/tmp/info.tmp.02.$$ host=`cat /etc/hostname` semaphore=/tmp/.flag_checking_daemon_log &#160; daemon=mysql &#160; if &#91;&#91; -e $semaphore &#93;&#93;; then echo &#34;checking for mysqld....Nothing [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_codebox"><table><tr id="p4811"><td class="code" id="p48code11"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #666666; font-style: italic;">### Checking del daemon.log per eventuali problemi sul DB MySQL</span>
<span style="color: #666666; font-style: italic;"># rel. 0.3 - 01 Agosto 2008</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># time_to_check_min=`date +&quot;%b %d %k:%M&quot; -d &quot;-1 min&quot;`</span>
<span style="color: #666666; font-style: italic;"># time_to_check_hour=`date +&quot;%b %d %k:%M&quot; -d &quot;-1 hour&quot;`</span>
<span style="color: #007800;">file_to_check</span>=<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>daemon.log
<span style="color: #007800;">tmp_file</span>=<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>info.tmp.01.<span style="color: #007800;">$$</span>
<span style="color: #007800;">tmp_file1</span>=<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>info.tmp.02.<span style="color: #007800;">$$</span>
<span style="color: #007800;">host</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">hostname</span><span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #007800;">semaphore</span>=<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>.flag_checking_daemon_log
&nbsp;
<span style="color: #007800;">daemon</span>=mysql
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-e</span> <span style="color: #007800;">$semaphore</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>;
  <span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;checking for mysqld....Nothing to do ....another cron is still working&quot;</span>
  <span style="color: #000000; font-weight: bold;">else</span>
    <span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #007800;">$semaphore</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #ff0000;">&quot;%d&quot;</span><span style="color: #000000; font-weight: bold;">`</span> <span style="color: #000000; font-weight: bold;">&amp;</span>lt; <span style="color: #ff0000;">'10'</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #007800;">time_to_check_min</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #ff0000;">&quot;%b %d %k:%M&quot;</span> <span style="color: #660033;">-d</span> <span style="color: #ff0000;">&quot;-1 min&quot;</span><span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-r</span> <span style="color: #ff0000;">'s/[[:space:]](0)([1-9])[[:space:]]/  2 /'</span><span style="color: #000000; font-weight: bold;">`</span>
    <span style="color: #007800;">time_to_check_hour</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #ff0000;">&quot;%b %d %k:%M&quot;</span> <span style="color: #660033;">-d</span> <span style="color: #ff0000;">&quot;-1 hour&quot;</span><span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-r</span> <span style="color: #ff0000;">'s/[[:space:]](0)([1-9])[[:space:]]/  2 /'</span><span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #000000; font-weight: bold;">else</span>
    <span style="color: #007800;">time_to_check_min</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #ff0000;">&quot;%b %d %k:%M&quot;</span> <span style="color: #660033;">-d</span> <span style="color: #ff0000;">&quot;-1 min&quot;</span><span style="color: #000000; font-weight: bold;">`</span>
    <span style="color: #007800;">time_to_check_hour</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #ff0000;">&quot;%b %d %k:%M&quot;</span> <span style="color: #660033;">-d</span> <span style="color: #ff0000;">&quot;-1 hour&quot;</span><span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #666666; font-style: italic;">#echo &quot;checking for &quot;&quot;$file_to_check  $time_to_check_min&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$time_to_check_min</span>&quot;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$file_to_check</span>&quot;</span> <span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #007800;">$tmp_file</span>
<span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$daemon</span>&quot;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$tmp_file</span>&quot;</span> <span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #007800;">$tmp_file1</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-e</span> <span style="color: #007800;">$tmp_file1</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>;
    <span style="color: #000000; font-weight: bold;">then</span>
        <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-s</span> <span style="color: #007800;">$tmp_file1</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
            mail <span style="color: #660033;">-s</span> <span style="color: #ff0000;">&quot;Something happening on [ <span style="color: #007800;">$daemon</span> ] for &quot;</span><span style="color: #ff0000;">&quot;<span style="color: #007800;">$host</span>&quot;</span> tech-c<span style="color: #000000; font-weight: bold;">@</span>bakeca.it <span style="color: #000000; font-weight: bold;">&amp;</span>lt; <span style="color: #007800;">$tmp_file1</span>
        <span style="color: #000000; font-weight: bold;">fi</span>
        <span style="color: #666666; font-style: italic;">#remove the tmp_file</span>
        <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> <span style="color: #007800;">$tmp_file</span>
        <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> <span style="color: #007800;">$tmp_file1</span>
    <span style="color: #000000; font-weight: bold;">fi</span>
   <span style="color: #666666; font-style: italic;">#removing the semaphore</span>
   <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> <span style="color: #007800;">$semaphore</span>
<span style="color: #000000; font-weight: bold;">fi</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.fabiolagana.net/bash-script-checking-mysql-problem-by-reading-daemonlog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Another trick for cloning</title>
		<link>http://blog.fabiolagana.net/another-trick-cloning/</link>
		<comments>http://blog.fabiolagana.net/another-trick-cloning/#comments</comments>
		<pubDate>Thu, 10 Jul 2008 15:13:02 +0000</pubDate>
		<dc:creator>Fabio Laganà</dc:creator>
				<category><![CDATA[bash]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[cloning]]></category>

		<guid isPermaLink="false">http://blog.fabiolagana.net/2008/07/10/another-trick-for-cloning-2/</guid>
		<description><![CDATA[For a beowulf of full fledged Debian systems (local disk, no shared /usr or anything like that) you'd need to use prototype-node: dselect (install and configure everything you want) dpkg --get-selections &#62; selection.file second node: dpkg --set-selections &#60; selection.file apt-get install dselect-upgrade [log any questions and answers] [create an expect script with your responses to [...]]]></description>
			<content:encoded><![CDATA[<pre>   For a beowulf of full fledged Debian systems (local disk, no shared /usr
or anything like that) you'd need to use

prototype-node:
 dselect  (install and configure everything you want)
 dpkg --get-selections &gt; selection.file

second node:

  dpkg --set-selections &lt; selection.file
  apt-get install dselect-upgrade
  [log any questions and answers]
  [create an expect script with your responses to any questions]

rest-of-nodes:

   dpkg --set-selections &lt; selection.file
  expect -c "apt-get install dselect-upgrade" -f expect-script
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabiolagana.net/another-trick-cloning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>checkinstall &#8211; trace your .tar.gz installations, and make/create your .deb files</title>
		<link>http://blog.fabiolagana.net/checkinstall-trace-targz-installations-makecreate-deb-files/</link>
		<comments>http://blog.fabiolagana.net/checkinstall-trace-targz-installations-makecreate-deb-files/#comments</comments>
		<pubDate>Sun, 08 Jun 2008 22:36:21 +0000</pubDate>
		<dc:creator>Fabio Laganà</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[checkinstall]]></category>
		<category><![CDATA[configure]]></category>
		<category><![CDATA[deb]]></category>
		<category><![CDATA[make]]></category>

		<guid isPermaLink="false">http://blog.fabiolagana.net/?p=42</guid>
		<description><![CDATA[Debian / Ubuntu sudo aptitude install checkinstall Now as an example I will compile and install aterm which is a terminal emulator, I will write about it later. Ok, get the code wget ftp://ftp.afterstep.org/apps/aterm/aterm-1.0.1.tar.gz Untar it tar xvzf aterm-1.0.1.tar.gz Change to its directory: cd aterm-1.0.1 Now, usually at this point you have to enter three [...]]]></description>
			<content:encoded><![CDATA[<p class="codigo"><strong>Debian / Ubuntu</strong></p>
<p class="codigo"><strong></strong>sudo aptitude install checkinstall</p>
<p>Now as an example I will compile and install <strong>aterm</strong> which is a <a id="KonaLink1" class="kLink" style="text-decoration: underline ! important; position: static;" href="http://www.go2linux.org/checkinstall-create-deb-rpm-from-sources#" target="_top" onclick="pageTracker._trackPageview('/outgoing/www.go2linux.org/checkinstall-create-deb-rpm-from-sources?referer=');"><span style="color: blue ! important; font-weight: 400; font-size: 12.8px; position: static;"><span class="kLink" style="color: blue ! important; font-family: Arial,Verdana,sans-serif; font-weight: 400; font-size: 12.8px; position: static;">terminal </span><span class="kLink" style="color: blue ! important; font-family: Arial,Verdana,sans-serif; font-weight: 400; font-size: 12.8px; position: static;">emulator</span></span></a>, I will write about it later.</p>
<p>Ok, get the code</p>
<p class="codigo">wget <a title="ftp://ftp.afterstep.org/apps/aterm/aterm-1.0.1.tar.gz" href="ftp://ftp.afterstep.org/apps/aterm/aterm-1.0.1.tar.gz">ftp://ftp.afterstep.org/apps/aterm/aterm-1.0.1.tar.gz</a></p>
<p>Untar it</p>
<p class="codigo">tar xvzf aterm-1.0.1.tar.gz</p>
<p>Change to its directory:</p>
<p class="codigo">cd aterm-1.0.1</p>
<p>Now, usually at this point you have to enter three commands</p>
<pre>./configure
make
make install
</pre>
<p>This time we will enter only the first two:</p>
<p class="codigo">./configure</p>
<p class="codigo">make</p>
<p>Now, here comes the magic, staying at the same directory change to root or use <a href="http://www.go2linux.org/sudoers-how-to" target="blank" onclick="pageTracker._trackPageview('/outgoing/www.go2linux.org/sudoers-how-to?referer=');">sudo</a></p>
<p class="codigo">sudo checkinstall</p>
<p>You will see something like this, the first time:</p>
<pre>checkinstall 1.6.1, Copyright 2002 Felipe Eduardo Sanchez Diaz Duran
           This software is released under the GNU GPL.

           The package documentation directory ./doc-pak does not exist.
           Should I create a default set of package docs?  <strong>[y]:</strong>
Preparing package documentation...OK
Please write a description for the package.
End your description with an empty line or EOF.
&gt;&gt; <strong>aterm 1.0.1</strong>
*****************************************
**** Debian package creation selected ***
*****************************************
This package will be built according to these values:

0 -  Maintainer: [ root@ggarron ]
1 -  Summary: [ aterm 1.0.1 ]
2 -  Name:    [ aterm ]
3 -  Version: [ 1.0.1 ]
4 -  Release: [ 1 ]
5 -  License: [ GPL ]
6 -  Group:   [ checkinstall ]
7 -  Architecture: [ i386 ]
8 -  Source location: [ aterm-1.0.1 ]
9 -  Alternate source location: [  ]
10 - Requires: [  ]
Enter a number to change any of them or press ENTER to continue:
Copying files to the temporary directory...OK
Stripping ELF binaries and libraries...OK
Compressing man pages...OK
Building file list...OK
Building Debian package...OK
Installing Debian package...OK
Erasing temporary files...OK
Writing backup package...OK
Deleting temp dir...OK
**********************************************************************
 Done. The new package has been installed and saved to
 /home/ggarron/Desktop/borrar/aterm-1.0.1/aterm_1.0.1-1_i386.deb
 You can remove it from your system anytime using:
 dpkg -r aterm
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabiolagana.net/checkinstall-trace-targz-installations-makecreate-deb-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>cloning disk using dd</title>
		<link>http://blog.fabiolagana.net/cloning-disk-using-dd/</link>
		<comments>http://blog.fabiolagana.net/cloning-disk-using-dd/#comments</comments>
		<pubDate>Thu, 29 May 2008 13:07:07 +0000</pubDate>
		<dc:creator>Fabio Laganà</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[cloning]]></category>
		<category><![CDATA[dd]]></category>
		<category><![CDATA[gzip]]></category>
		<category><![CDATA[zcat]]></category>

		<guid isPermaLink="false">http://blog.fabiolagana.net/?p=11</guid>
		<description><![CDATA[from your machine to external usb disk: dd if=/dev/&#38;lt;your machine disk&#38;gt; &#124; gzip &#38;gt; /path/nameofyourimg.gz from your img saved to external usb disk: zcat /path/nameofyourimg.gz &#124; dd of=/dev/&#38;lt;your machine disk&#38;gt;]]></description>
			<content:encoded><![CDATA[<p>from your machine to external usb disk:</p>

<div class="wp_codebox"><table><tr id="p1114"><td class="code" id="p11code14"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">dd</span> <span style="color: #007800;">if</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/&amp;</span>lt;your machine disk<span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">gzip</span> <span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>nameofyourimg.gz</pre></td></tr></table></div>

<p>from your img saved to  external usb disk:</p>

<div class="wp_codebox"><table><tr id="p1115"><td class="code" id="p11code15"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">zcat</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>nameofyourimg.gz <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">dd</span> <span style="color: #007800;">of</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/&amp;</span>lt;your machine disk<span style="color: #000000; font-weight: bold;">&amp;</span>gt;</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.fabiolagana.net/cloning-disk-using-dd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Variables</title>
		<link>http://blog.fabiolagana.net/linux-variables/</link>
		<comments>http://blog.fabiolagana.net/linux-variables/#comments</comments>
		<pubDate>Thu, 10 Apr 2008 12:32:27 +0000</pubDate>
		<dc:creator>Fabio Laganà</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Variables]]></category>

		<guid isPermaLink="false">http://blog.fabiolagana.net/?p=9</guid>
		<description><![CDATA[When variables are used they are referred to with the $ symbol in front of them. There are several useful variables available in the shell program. Here are a few: $$ = The PID number of the process executing the shell. $? = Exit status variable. $0 = The name of the command you used [...]]]></description>
			<content:encoded><![CDATA[<p>When variables are used they are referred to with the $ symbol in front of them. There are several useful variables available in the shell program. Here are a few:</p>
<ul>
<li>$$ = The PID number of the process executing the shell.</li>
<li>$? = Exit status variable.</li>
<li>$0 = The name of the command you used to call a program.</li>
<li>$1 = The first argument on the command line.</li>
<li>$2 = The second argument on the command line.</li>
<li>$n = The nth argument on the command line.</li>
<li>$* = All the arguments on the command line.</li>
<li>$# The number of command line arguments.</li>
</ul>
<p>The &#8220;shift&#8221; command can be used to shift command line arguments to the left, ie $1 becomes the value of $2, $3 shifts into $2, etc. The command, &#8220;shift 2&#8243; will shift 2 places meaning the new value of $1 will be the old value of $3 and so forth.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabiolagana.net/linux-variables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
