<?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>The Writer&#039;s Technology Companion &#187; file management</title>
	<atom:link href="http://www.writerstechnology.com/tag/file-management/feed" rel="self" type="application/rss+xml" />
	<link>http://www.writerstechnology.com</link>
	<description>Tools, Tips, and Technology for Productive Writers</description>
	<lastBuildDate>Mon, 08 Feb 2010 13:00:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Moving to Linux: Working with Text (Part 2)</title>
		<link>http://www.writerstechnology.com/2008/11/moving-to-linux-working-with-text-part-2</link>
		<comments>http://www.writerstechnology.com/2008/11/moving-to-linux-working-with-text-part-2#comments</comments>
		<pubDate>Mon, 03 Nov 2008 14:51:52 +0000</pubDate>
		<dc:creator>Aaron Peters</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[diff]]></category>
		<category><![CDATA[file management]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://www.writerstechnology.com/?p=487</guid>
		<description><![CDATA[In the last installment, we examined how to compose and check your writing using the Linux tools txt2tags and aspell. Let’s assume that you’ve used these tools now–used them quite a lot. You now have several directories and sub-directories filled with dozens of text files. How to organize all of this text? Don’t worry, Linux [...]<p><div style="border: 1px darkblue; color: lightblue; padding: 5px; margin: 5px;">Post from: <a href="http://www.writerstechnology.com">The Writer's Technology Companion</a>.<hr />Buy my book! <a href="http://www.dwax.org/stupid">Don't Be Stupid: A Guide to Learning, Studying, and Succeeding at College</a></div>

<br/><br/><a href="http://www.writerstechnology.com/2008/11/moving-to-linux-working-with-text-part-2">Moving to Linux: Working with Text (Part 2)</a></p>
]]></description>
			<content:encoded><![CDATA[<p class="dropcap-first">In the <a href="http://www.writerstechnology.com/2008/10/moving-to-linux-working-with-text-part-1">last installment</a>, we examined how to compose and check your writing using the Linux tools txt2tags and aspell.  Let’s assume that you’ve used these tools now–used them quite a lot.  You now have several directories and sub-directories filled with dozens of text files.  How to organize all of this text?</p>
<p>Don’t worry, Linux has you covered.</p>
<h3>Searching</h3>
<p>Unix users have become very adept at managing files in plain text format that might be stored all over a computer (including extremely large server systems).  Historically, unlike systems such as Windows that often store system configuration data in proprietary (read: bizarre, and all-but-incomprehensible to even veteran users) format, most Unix configuration files are kept as plain text.  So, in order for Unix admins to find these configurations over an entire system, many utilities to search text were created. <span id="more-487"></span></p>
<p>Linux includes these, and you can use them not only to find and manage system configs, but anything stored in plain text (such as HTML files).  The Linux utility for this is called <code>grep</code>.  Please don’t ask me what the word means, just look <a href="http://en.wikipedia.org/wiki/Grep">here</a>.  Searching with it is as easy as entering a command like the one below:</p>
<p><code>grep -R yoursearchword *</code></p>
<p>This command will search all files in the directory you are currently in, and all those below (and the one below those, etc…) for the term “yoursearchword.”  The “-R” flag stands for “recursive,” which tells <code>grep</code> to go into all downward directories.  The “*” acts as you might expect, and searches all files; the command could have just as easily been “*.txt* to search text files or “*.html” to search web page files.  The command will give you a result like the one below, listing all the files that contained the search term:</p>
<p>Now that we’ve found what we’re looking for, let’s say it was an old version of a draft.  You might find it useful to compare it to what you have currently, say, to save that one genius piece of prose that you’d forgotten to copy over.</p>
<h3>Comparing</h3>
<p>There is also a Unix utility for comparing two text files for changes between them.  <code>diff</code> looks at two files, line by line, and identifies anywhere that the two don’t match up.  It will output a list of files and line numbers where the files don’t match up.  So, if you know there’s a paragraph that’s missing from your current file, and it was in a different file, then you’ll be able to find it.  This may not seem like a benefit if you’re comparing two files: after all, it might be easier to just look at them.  Maybe… but it will probably take you more than .7 seconds, which is the length of time a two-file compare would take.  You could do so with the following command:</p>
<p><code>diff yourtextfile1.txt yourtextfile2.t2t</code></p>
<p>Note the difference extensions–<code>diff</code> doesn’t care what the files are called, as long as they’re text.  So you could compare a “.txt” file to an “.html” file.  Just be prepared for a lot of results.</p>
<p>But what if you’re genius paragraph is buried somewhere in your several-levels-deep directory tree with dozens of files.  <code>diff</code> will allow you to set a “base” file to compare all other files against.  Consider the following:</p>
<p><code>diff -r -y --to-file="yourbasefile.txt" .</code></p>
<p>Here, the “-r” flag works the same as above, telling the program to recurse lower-level directories, and “-y” tells it to give you a side-by-side listing (you’ll want this format at first).  The “–to-file=” flag instructs <code>diff</code> to compare all files it finds, one file at a time, against the file “yourbasefile.txt.”  Finally, the trailing “.” is Unix’s (and DOS’, if you remember) abbreviation for your current directory.  So, the above command will go through the current directory, and all those below it, and compare each file it finds to “yourbasefile.txt.”  Sounds slightly more useful?  I agree.</p>
<p>With the above two programs, in addition to the drafting tools we discussed last time, gives most writers everything they would need to <em>draft</em> their ideas.  But once your ideas are on-screen, what then?  Most writers will need to add formatting (or confirm, since we’ve done that already with <code>txt2tags</code>), add things like tables of contents, indeces, and possibly collaborate with others on authoring.  There are certainly ways to accomplish these using plain-text tools, but for many, using other programs will be more convenient.  In the next installment, we’ll look at the latest version of the king of Linux word processors, OpenOffice.org, and see what’s new for writers.</p>
<div class="zemanta-pixie" style="15px;"><img class="zemanta-pixie-img" style="right;" src="http://img.zemanta.com/pixy.gif?x-id=d215091e-959b-4907-8b76-79224ab97682" alt="" /></div>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.writerstechnology.com/2008/10/moving-to-linux-working-with-text-part-1" rel="bookmark" class="crp_title">Moving to Linux: Working with Text (Part 1)</a></li><li><a href="http://www.writerstechnology.com/2009/09/moving-to-linux-working-with-the-netbook-part-2" rel="bookmark" class="crp_title">Moving to Linux: Working with the Netbook, Part 2</a></li><li><a href="http://www.writerstechnology.com/2008/11/moving-to-linux-the-netbook-is-your-new-best-friend" rel="bookmark" class="crp_title">Moving to Linux: The Netbook is Your New Best Friend</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/contextual-related-posts/">Contextual Related Posts</a></li></ul></div><p><div style="border: 1px darkblue; color: lightblue; padding: 5px; margin: 5px;">Post from: <a href="http://www.writerstechnology.com">The Writer’s Technology Companion</a>.<hr />Buy my book! <a href="http://www.dwax.org/stupid">Don’t Be Stupid: A Guide to Learning, Studying, and Succeeding at College</a></div>

<br/><br/><a href="http://www.writerstechnology.com/2008/11/moving-to-linux-working-with-text-part-2">Moving to Linux: Working with Text (Part 2)</a></p>
 <!--<div class="series_links"><a style="font-size: small" href='http://www.writerstechnology.com/2008/10/moving-to-linux-working-with-text-part-1' title='Moving to Linux: Working with Text (Part 1)'>Previous in series</a> <a style="font-size: small" href='http://www.writerstechnology.com/2008/11/moving-to-linux-the-new-openoffice' title='Moving to Linux: The New OpenOffice'>Next in series</a></div>--><br><div class="series_toc" style="font-size: small;"><h4>Posts in “Moving to Linux: Tools for Writers” series</h3><ol><li><a href='http://www.writerstechnology.com/2008/10/moving-to-linux-tools-for-writers' title='Moving to Linux: Tools for Writers'>Moving to Linux: Tools for Writers</a></li><li><a href='http://www.writerstechnology.com/2008/10/moving-to-linux-working-with-text-part-1' title='Moving to Linux: Working with Text (Part 1)'>Moving to Linux: Working with Text (Part 1)</a></li><li>Moving to Linux: Working with Text (Part 2)</li><li><a href='http://www.writerstechnology.com/2008/11/moving-to-linux-the-new-openoffice' title='Moving to Linux: The New OpenOffice'>Moving to Linux: The New OpenOffice</a></li><li><a href='http://www.writerstechnology.com/2008/11/moving-to-linux-scribus-for-writers' title='Moving to Linux: Scribus for Writers'>Moving to Linux: Scribus for Writers</a></li><li><a href='http://www.writerstechnology.com/2008/11/moving-to-linux-the-netbook-is-your-new-best-friend' title='Moving to Linux: The Netbook is Your New Best Friend'>Moving to Linux: The Netbook is Your New Best Friend</a></li><li><a href='http://www.writerstechnology.com/2008/11/moving-to-linux-working-with-the-netbook' title='Moving to Linux: Working with the Netbook'>Moving to Linux: Working with the Netbook</a></li><li><a href='http://www.writerstechnology.com/2009/09/moving-to-linux-working-with-the-netbook-part-2' title='Moving to Linux: Working with the Netbook, Part 2'>Moving to Linux: Working with the Netbook, Part 2</a></li></ol></div><br>]]></content:encoded>
			<wfw:commentRss>http://www.writerstechnology.com/2008/11/moving-to-linux-working-with-text-part-2/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

