<?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>Random Wisdom &#187; filesystem</title>
	<atom:link href="http://scrolls.mafgani.net/tag/filesystem/feed/" rel="self" type="application/rss+xml" />
	<link>http://scrolls.mafgani.net</link>
	<description>An attempt at organizing my thoughts ...</description>
	<lastBuildDate>Sun, 13 Mar 2011 22:54:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Create links with absolute paths in Linux</title>
		<link>http://scrolls.mafgani.net/2010/01/create-links-with-absolute-paths-in-linux/</link>
		<comments>http://scrolls.mafgani.net/2010/01/create-links-with-absolute-paths-in-linux/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 19:10:18 +0000</pubDate>
		<dc:creator>Mostafa</dc:creator>
				<category><![CDATA[How To ...]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[file processing]]></category>
		<category><![CDATA[filesystem]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://scrolls.mafgani.net/?p=420</guid>
		<description><![CDATA[The default behaviour of the linking command (ln) is a little strange under certain circumstances. Since it creates the links using the literal value of the target, symbolic links created using relative path structures can often fail. Consider the following: $ ln -s targetfile ../src/targetfile_link Without a doubt, &#8216;targetfile_link&#8217; will be a broken symlink since [...]]]></description>
			<content:encoded><![CDATA[<p>The default behaviour of the linking command (<strong>ln</strong>) is a little strange under certain circumstances. Since it creates the links using the literal value of the target, symbolic links created using relative path structures can often fail. Consider the following:</p>
<pre>$ ln -s targetfile ../src/targetfile_link</pre>
<p>Without a doubt, &#8216;targetfile_link&#8217; will be a broken symlink since it links to a target that it assumes is in the same directory:</p>
<pre>$ cd ../src &amp;&amp; ls -l targetfile_link
lrwxrwxrwx 1 mafgani mafgani 5 2010-01-16 18:19 targetfile_link -&gt; targetfile</pre>
<p>This is quite unfortunate since it clearly clashes with the way that the linking mechanism should work intuitively.</p>
<p>The solution is to force <strong>ln</strong> into automatically appending the absolute path to the target files. This can be achieved by using a simple shell script that acts as a wrapper for the real linking command:</p>
<pre style="color: #99ccff">
#!/bin/sh

# Step through the supplied arguments and append the absolute
# path to targets that exist
for ARG in $@
do
  if [ -e $ARG ]; then
    LNARGS="${LNARGS} ${PWD}/${ARG}";
  else
    LNARGS="${LNARGS} ${ARG}";
  fi
done

# Execute the actual link command with the modified args
exec /bin/ln ${LNARGS};
</pre>
<p>There are two known caveats:</p>
<ul>
<li> The link is &#8216;sub-optimal&#8217; if created from within the destination directory (the absolute path contains &#8216;../&#8217;s). It will still work however.</li>
<li>  The links will always be absolute. If that is undesirable, save the script as &#8216;absln&#8217; or something other than &#8216;ln&#8217;.</li>
</ul>
<p>Using &#8216;absln&#8217; instead of &#8216;ln&#8217; in the previously described scenario now produces a working symlink:</p>
<pre>$ absln -s targetfile ../src/targetfile_link
$ cd ../src/ &#038;&#038; ls -l targetfile_link
lrwxrwxrwx 1 mafgani mafgani 16 2010-01-16 19:13 targetfile_link -> /tmp/files/targetfile</pre>
]]></content:encoded>
			<wfw:commentRss>http://scrolls.mafgani.net/2010/01/create-links-with-absolute-paths-in-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cross-platform filesystem access</title>
		<link>http://scrolls.mafgani.net/2006/11/cross-platform-filesystem-access/</link>
		<comments>http://scrolls.mafgani.net/2006/11/cross-platform-filesystem-access/#comments</comments>
		<pubDate>Tue, 21 Nov 2006 09:01:00 +0000</pubDate>
		<dc:creator>Mostafa</dc:creator>
				<category><![CDATA[How To ...]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[ext2]]></category>
		<category><![CDATA[ext3]]></category>
		<category><![CDATA[filesystem]]></category>
		<category><![CDATA[fstab]]></category>
		<category><![CDATA[ntfs]]></category>
		<category><![CDATA[ntfs-3g]]></category>

		<guid isPermaLink="false">http://scrolls.mafgani.net/?p=73</guid>
		<description><![CDATA[Looks like the ntfs-3g driver has already gained a lot of popularity and is quite easy to use: NTFS-3G Read/Write Driver The driver itself is supposedly available from the Fedora Extras repository for FC6 onwards. Completely safe read/write access to NTFS drives from Linux &#8212; now that&#8217;s a dream come true! In the meanwhile, it [...]]]></description>
			<content:encoded><![CDATA[<p>Looks like the <span style="font-weight:bold;">ntfs-3g</span> driver has already gained a lot of popularity and is quite easy to use:</p>
<p><a href="http://www.ntfs-3g.org/">NTFS-3G Read/Write Driver</a></p>
<p>The driver itself is supposedly available from the Fedora Extras repository for FC6 onwards. Completely safe read/write access to NTFS drives from Linux &#8212; now that&#8217;s a dream come true!</p>
<p>In the meanwhile, it looks like there&#8217;s also a windows Ext2 file-system driver that allows full read/write access to Ext2/3 volumes:</p>
<p><a href="http://fs-driver.org/index.html">Ext2 Installable File System For Windows</a></p>
<p>Of course, one of the drawbacks here is that the Ext3 volume is mounted as Ext2 &#8212; so there is no journaling support. In case of a &#8216;dirty&#8217; unmount <span style="font-weight:bold;">e2fsck</span> will have to be run. The other drawback is the fact that is won&#8217;t work with LVM.</p>
<p>So, these drivers really open up a lot of choices. But I guess the best option is to have the shared drive as NTFS since the <span style="font-weight:bold;">ntfs-3g</span> driver takes care of journaling.</p>
]]></content:encoded>
			<wfw:commentRss>http://scrolls.mafgani.net/2006/11/cross-platform-filesystem-access/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finally, NTFS write support!</title>
		<link>http://scrolls.mafgani.net/2006/07/finally-ntfs-write-support/</link>
		<comments>http://scrolls.mafgani.net/2006/07/finally-ntfs-write-support/#comments</comments>
		<pubDate>Sun, 16 Jul 2006 16:19:00 +0000</pubDate>
		<dc:creator>Mostafa</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[driver]]></category>
		<category><![CDATA[filesystem]]></category>
		<category><![CDATA[ntfs]]></category>

		<guid isPermaLink="false">http://scrolls.mafgani.net/?p=69</guid>
		<description><![CDATA[Slashdot ran a story yesterday about the new fully open source NTFS driver that has full read and write support for NTFS volumes. Although still in BETA phase it looks really promising. Too bad it doesn&#8217;t work on 64-bit systems yet. I&#8217;m definitely keeping my eyes peeled for this one .. More details and download [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://slashdot.org">Slashdot</a> ran a story <a href="http://developers.slashdot.org/article.pl?sid=06/07/15/1346250">yesterday</a> about the new fully open source NTFS driver that has full read and <span style="font-weight: bold; color: rgb(255, 0, 0);font-size:150%;" >write support</span> for NTFS volumes. Although still in BETA phase it looks really promising. Too bad it doesn&#8217;t work on 64-bit systems yet. I&#8217;m definitely keeping my eyes peeled for this one ..</p>
<p>More details and download links here:</p>
<p><a href="http://sourceforge.net/mailarchive/forum.php?thread_id=23836054&amp;forum_id=2697">[announcement] ntfs-3g: open source read-write driver</a></p>
]]></content:encoded>
			<wfw:commentRss>http://scrolls.mafgani.net/2006/07/finally-ntfs-write-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

