<?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>Pario TechnoBlob &#187; Linux</title>
	<atom:link href="http://pario.no/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://pario.no</link>
	<description>A cronological documentation test project, nothing serious, really!</description>
	<lastBuildDate>Thu, 02 Feb 2012 13:17:58 +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>Recursively symlinking files</title>
		<link>http://pario.no/2012/02/02/recursively-symlinking-files/</link>
		<comments>http://pario.no/2012/02/02/recursively-symlinking-files/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 22:56:50 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[ln]]></category>
		<category><![CDATA[symlink]]></category>

		<guid isPermaLink="false">http://pario.no/?p=1693</guid>
		<description><![CDATA[This is a short script I use to symlink all my JPG image files on my file server to a flat folder accessible to my DLNA enabled devices. My files are organized in year folders and under each year there are month folders: -2011 --2011-01 --2011-02 --2011-03 ... -2012 --2012-01 I avoid duplicate symlinks by [...]]]></description>
			<content:encoded><![CDATA[<p>This is a short script I use to symlink all my JPG image files on my file server to a flat folder accessible to my DLNA enabled devices.<br />
My files are organized in year folders and under each year there are month folders:</p>
<pre>
-2011
--2011-01
--2011-02
--2011-03
...
-2012
--2012-01</pre>
<p>I avoid duplicate symlinks by using file names like 20110102-1234_DSC&#8230;JPG or YYYYMMDD-HHMM_OriginalFileName.JPG</p>
<p>The script looks like this</p>
<pre>
#!/bin/bash 

SRC="/media/Images"
DEST="/media/SymlinkTarget"

# Create a symlink under $DEST for each JPG file under $SRC
find $SRC -type f | grep -i jpg | while read PATHNAME; do
        NEW="$DEST";
        echo "$NEW";
        ln -s "$PATHNAME" "$NEW";
done</pre>
<script type="text/javascript">var wordpress_toolbar_urls = [];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMTIvMDIvMDIvcmVjdXJzaXZlbHktc3ltbGlua2luZy1maWxlcy88d3B0Yj5SZWN1cnNpdmVseSBzeW1saW5raW5nIGZpbGVzPHdwdGI%2BaHR0cDovL3BhcmlvLm5vPHdwdGI%2BUGFyaW8gVGVjaG5vQmxvYg%3D%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2012/02/02/recursively-symlinking-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Lsyncd to perform &#8220;live&#8221; syncronization of a local directory to a remote directory</title>
		<link>http://pario.no/2012/01/13/using-lsyncd-to-perform-live-syncronization-of-a-local-directory-to-a-remote-directory/</link>
		<comments>http://pario.no/2012/01/13/using-lsyncd-to-perform-live-syncronization-of-a-local-directory-to-a-remote-directory/#comments</comments>
		<pubDate>Fri, 13 Jan 2012 18:14:20 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[lsyncd]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ssh-keygen]]></category>

		<guid isPermaLink="false">http://pario.no/?p=1672</guid>
		<description><![CDATA[This post is a short HOWTO and describes how you can install and run lsyncd to perform a rsync syncronization from local to a remote server using SSH. Lsyncd is a daemon to continuously synchronize directory trees and relies on inotify. If you need real live syncronization DRBD might be a better alternative since it [...]]]></description>
			<content:encoded><![CDATA[<p>This post is a short HOWTO and describes how you can install and run <a href="http://code.google.com/p/lsyncd/">lsyncd</a> to perform a rsync syncronization from local to a remote server using SSH.<br />
Lsyncd is a daemon to continuously synchronize directory trees and relies on inotify. If you need real live syncronization DRBD might be a better alternative since it is a block level syncronization. </p>
<p><strong>Installing Lsyncd 2.0 from source on CentOS 6</strong><br />
Lsyncd is not included as a package in CentOS 6, so you need to download the source file from <a href="http://code.google.com/p/lsyncd/downloads/list">http://code.google.com/p/lsyncd/downloads/list</a>.<br />
You should have rsync, GCC and lua-devel installed on your system before you continue installing Lsyncd.</p>
<pre>
# yum install rsync lua-devel</pre>
<p>Unpack the lsyncd source file and run the following commands from the unpacked file</p>
<pre>
# configure
# make
# make install</pre>
<p>make install copies the compiled files and install them to the right directories in your system.</p>
<p>I need to configure a non password SSH communication between the two servers with a shared SSH key.<br />
On the source server run the following command to generate a SSH key, if you have not done this already.<br />
Remember to do this as the user you are going to perform the sync with.</p>
<pre>
# ssh-keygen</pre>
<p>Secure copy the generated SSH key from the source server to your target server</p>
<pre>
# scp ~/.ssh/id_rsa.pub root@remoteserver:/tmp</pre>
<p>On the target server you need to add the copied SSH key to your existing authorized keys file.<br />
Also remember to do this with the user you are going to connect with from the source server.</p>
<pre>
# cat /tmp/id_rsa.pub >> ~/.ssh/authorized_keys</pre>
<p>If you do not have this file, just create it using the touch command described below</p>
<pre>
# touch ~/.ssh/authorized_keys</pre>
<p>Test if you can ssh without a password from your source server to the target server.</p>
<p>I have made a config file, <strong>/root/scripts/lsyncd.conf</strong> that tells Lsyncd where to put the log- and statusfile. That it should be running as a daemon in the background, and a sync should occur after 900 seconds (15 minutes) if there have not been any filesystem changes and there should not be more than 6 parallell Lsyncd processes.</p>
<pre>
settings = {
   logfile      = "/tmp/lsyncd.log",
   statusFile   = "/tmp/lsyncd.status",
   nodaemon     = false,
   maxDelays    = 900,
   maxProcesses = 6,
}

sync{default.rsyncssh, source="/path/on/source/", host="hostnam.target.server.tld", targetdir="/path/on/target/"}</pre>
<p>To start lsyncd you run the command</p>
<pre>
# lsyncd /root/scripts/lsyncd.conf</pre>
<p>You should now see a Lsyncd process running as a daemon on your system. It performs a sync when you start and then waits for any filesystem changes or sync after 900 seconds.</p>
<p>If you would like Lsyncd to start at boot, just add the following line to the bottom of file <strong>/etc/rc.local</strong></p>
<pre>
lsyncd /root/scripts/lsyncd.conf</pre>
<p>You do now have a working secure rsync syncronization between two servers.</p>
<p><strong>What directories you are syncing</strong></p>
<pre>
# tail -f /tmp/lsyncd.status</pre>
<p><strong>What is happening now</strong></p>
<pre>
# tail -f /tmp/lsyncd.log</pre>
<script type="text/javascript">var wordpress_toolbar_urls = ["http:\/\/code.google.com\/p\/lsyncd\/","http:\/\/code.google.com\/p\/lsyncd\/downloads\/list"];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMTIvMDEvMTMvdXNpbmctbHN5bmNkLXRvLXBlcmZvcm0tbGl2ZS1zeW5jcm9uaXphdGlvbi1vZi1hLWxvY2FsLWRpcmVjdG9yeS10by1hLXJlbW90ZS1kaXJlY3RvcnkvPHdwdGI%2BVXNpbmcgTHN5bmNkIHRvIHBlcmZvcm0gJiM4MjIwO2xpdmUmIzgyMjE7IHN5bmNyb25pemF0aW9uIG9mIGEgbG9jYWwgZGlyZWN0b3J5IHRvIGEgcmVtb3RlIGRpcmVjdG9yeTx3cHRiPmh0dHA6Ly9wYXJpby5ubzx3cHRiPlBhcmlvIFRlY2hub0Jsb2I%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2012/01/13/using-lsyncd-to-perform-live-syncronization-of-a-local-directory-to-a-remote-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to join *.001,*.002,… files from your Linux terminal</title>
		<link>http://pario.no/2012/01/02/how-to-join-001-002-files-from-your-linux-terminal/</link>
		<comments>http://pario.no/2012/01/02/how-to-join-001-002-files-from-your-linux-terminal/#comments</comments>
		<pubDate>Sun, 01 Jan 2012 22:23:50 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[cat]]></category>
		<category><![CDATA[howto]]></category>

		<guid isPermaLink="false">http://pario.no/?p=1668</guid>
		<description><![CDATA[This is a easy way to combine/join/merge several .001 .002 .003 etc files to one file. # cat filename.avi.* > filename.avi The .001 .002 .003 files can be deleted after you have verfied that the files have merged together successfully to one file. If you were using Windows you would normally use a software like [...]]]></description>
			<content:encoded><![CDATA[<p>This is a easy way to combine/join/merge several .001 .002 .003 etc files to one file.</p>
<pre>
# cat filename.avi.* > filename.avi</pre>
<p>The .001 .002 .003 files can be deleted after you have verfied that the files have merged together successfully to one file.</p>
<p>If you were using Windows you would normally use a software like HJSplit or similar.</p>
<script type="text/javascript">var wordpress_toolbar_urls = [];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMTIvMDEvMDIvaG93LXRvLWpvaW4tMDAxLTAwMi1maWxlcy1mcm9tLXlvdXItbGludXgtdGVybWluYWwvPHdwdGI%2BSG93IHRvIGpvaW4gKi4wMDEsKi4wMDIs4oCmIGZpbGVzIGZyb20geW91ciBMaW51eCB0ZXJtaW5hbDx3cHRiPmh0dHA6Ly9wYXJpby5ubzx3cHRiPlBhcmlvIFRlY2hub0Jsb2I%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2012/01/02/how-to-join-001-002-files-from-your-linux-terminal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disable IPv6 on Ubuntu 11.10</title>
		<link>http://pario.no/2011/12/09/disable-ipv6-on-ubuntu-11-10/</link>
		<comments>http://pario.no/2011/12/09/disable-ipv6-on-ubuntu-11-10/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 08:39:49 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[11.10]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[sysct]]></category>
		<category><![CDATA[sysctl.conf]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[ubuntu oneiric]]></category>

		<guid isPermaLink="false">http://pario.no/?p=1662</guid>
		<description><![CDATA[This is a short HOWTO on disabling IP version 6 support on your ethernet devices like eth0 on Ubuntu 11.10. I guess you can do this on earlier version of Ubuntu as well. Add the following line to the end of the file /etc/sysctl.conf (as root or use sudo) net.ipv6.conf.all.disable_ipv6 = 1 Run the following [...]]]></description>
			<content:encoded><![CDATA[<p>This is a short HOWTO on disabling IP version 6 support on your ethernet devices like eth0 on Ubuntu 11.10.<br />
I guess you can do this on earlier version of Ubuntu as well.</p>
<p><il>
<li>Add the following line to the end of the file <strong>/etc/sysctl.conf</strong> (as root or use sudo)</p>
<li>
<pre>net.ipv6.conf.all.disable_ipv6 = 1</pre>
</li>
</li>
</ul>
<p>Run the following command to make this change effective immediately</p>
<pre># sudo sysctl -p</pre>
<p>A result from this command could be like this</p>
<pre>
net.ipv6.conf.all.disable_ipv6 = 1</pre>
<p>To check that IPv6 has been disabled or not, run the following command from your console window</p>
<pre>
# ip a | grep inet</pre>
<p>IPv6 has been disabled if this command does not return any IPv6 addresses.</p>
<script type="text/javascript">var wordpress_toolbar_urls = [];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMTEvMTIvMDkvZGlzYWJsZS1pcHY2LW9uLXVidW50dS0xMS0xMC88d3B0Yj5EaXNhYmxlIElQdjYgb24gVWJ1bnR1IDExLjEwPHdwdGI%2BaHR0cDovL3BhcmlvLm5vPHdwdGI%2BUGFyaW8gVGVjaG5vQmxvYg%3D%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2011/12/09/disable-ipv6-on-ubuntu-11-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Grab several screenshots from specified window in linux</title>
		<link>http://pario.no/2011/12/02/grab-several-screenshots-from-specified-window-in-linux/</link>
		<comments>http://pario.no/2011/12/02/grab-several-screenshots-from-specified-window-in-linux/#comments</comments>
		<pubDate>Fri, 02 Dec 2011 07:23:01 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[PNG]]></category>
		<category><![CDATA[windowid]]></category>
		<category><![CDATA[wxd]]></category>

		<guid isPermaLink="false">http://pario.no/?p=1651</guid>
		<description><![CDATA[This was a short bash script I wrote to help document some startup problems on a server. The script was grabbing screen dumps from iDRAC during boot on a RHEL6 server, but it can be used on other distributions as well since the console command xwd is common. #!/bin/bash # Description: # Grab screenshot of [...]]]></description>
			<content:encoded><![CDATA[<p>This was a short bash script I wrote to help document some startup problems on a server.<br />
The script was grabbing screen dumps from iDRAC during boot on a RHEL6 server, but it can be used on other distributions as well since the console command xwd is common.</p>
<pre>
#!/bin/bash
# Description:
# Grab screenshot of a specified X-window and wait X-seconds

# Use xwininfo to find the Window id to the window you are going to
# grab screenshots from.
xwininfo="0x4c0001a"

# filename for output
outfile="outfile-"

# seconds sleep between grabs
sleeping=2

padding="000" # put as many padding zeros as you want on filename
for ((i=0; i<1000; i+=1))
do
        # Perform the actual screenshot grab
        xwd -id $xwininfo -out $outfile-${padding:${#i}}$i.xwd

        # Convert the xwd file to a better image format like PNG
        convert $outfile-${padding:${#i}}$i.xwd $outfile-${padding:${#i}}$i.png

        # Delete the converted XWD-file
        rm -f $outfile-${padding:${#i}}$i.xwd

        # wait
        sleep $sleeping
done</pre>
<p>Stop the script after you have grabbed enough screenshots.</p>
<p>I ended up with several files named outfile-000.png outfile-001.png ...<br />
Deleted those files that were not needed and sent the images a documentation of the booting process.</p>
<script type="text/javascript">var wordpress_toolbar_urls = [];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMTEvMTIvMDIvZ3JhYi1zZXZlcmFsLXNjcmVlbnNob3RzLWZyb20tc3BlY2lmaWVkLXdpbmRvdy1pbi1saW51eC88d3B0Yj5HcmFiIHNldmVyYWwgc2NyZWVuc2hvdHMgZnJvbSBzcGVjaWZpZWQgd2luZG93IGluIGxpbnV4PHdwdGI%2BaHR0cDovL3BhcmlvLm5vPHdwdGI%2BUGFyaW8gVGVjaG5vQmxvYg%3D%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2011/12/02/grab-several-screenshots-from-specified-window-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

