<?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>JJB Blog &#187; script</title>
	<atom:link href="http://blog.johnjosephbachir.org/tag/script/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.johnjosephbachir.org</link>
	<description></description>
	<lastBuildDate>Wed, 04 Jan 2012 05:47:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>An excellent script for removing duplicate files from an iTunes library</title>
		<link>http://blog.johnjosephbachir.org/2007/05/15/an-excellent-script-for-removing-duplicate-files-from-an-itunes-library/</link>
		<comments>http://blog.johnjosephbachir.org/2007/05/15/an-excellent-script-for-removing-duplicate-files-from-an-itunes-library/#comments</comments>
		<pubDate>Tue, 15 May 2007 05:25:56 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[clean]]></category>
		<category><![CDATA[delete]]></category>
		<category><![CDATA[duplicate]]></category>
		<category><![CDATA[files]]></category>
		<category><![CDATA[itunes]]></category>
		<category><![CDATA[media]]></category>
		<category><![CDATA[remove]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[songs]]></category>

		<guid isPermaLink="false">http://blog.johnjosephbachir.org/2007/05/15/an-excellent-script-for-removing-duplicate-files-from-an-itunes-library/</guid>
		<description><![CDATA[After shifting some media around I recently found myself with a lot of duplicate files in my iTunes library. iTunes&#8217; &#8220;Show Duplicates&#8221; feature is a nice thought but doesn&#8217;t come near being useful in the case of thousands of duplicates &#8212; not only is the heuristic sophomoric, there is no way to select &#8220;every other&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>After shifting some media around I recently found myself with a lot of duplicate files in my iTunes library. iTunes&#8217; &#8220;Show Duplicates&#8221; feature is a nice thought but doesn&#8217;t come near being useful in the case of thousands of duplicates &#8212; not only is the heuristic sophomoric, there is no way to select &#8220;every other&#8221; file &#8212; you must select either all the files or none of them.</p>
<p>I searched far and wide for a third-party program or script and was surprised by how poor the solutions were. I found a handful of shareware programs that were either flakey, underfeatured, overpriced, or all of the above, and a smattering of shell scripts that didn&#8217;t do quite what I was looking for.</p>
<p>Finally I came across <a href="http://www.opensourceconnections.com/2006/11/11/better-itunes-song-deduping/">this applescript</a>, and it does precisely what I want (and what I imagine everyone with this problem wants): finds duplicate songs according to user-specified metadata dimensions, and put &#8220;all but one&#8221; of each file in a playlist. Select all, option delete, DONE.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.johnjosephbachir.org/2007/05/15/an-excellent-script-for-removing-duplicate-files-from-an-itunes-library/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Backup script from Jon Mills</title>
		<link>http://blog.johnjosephbachir.org/2007/01/18/backup-script-from-jon-mills/</link>
		<comments>http://blog.johnjosephbachir.org/2007/01/18/backup-script-from-jon-mills/#comments</comments>
		<pubDate>Thu, 18 Jan 2007 06:57:01 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[ibiblio]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://blog.johnjosephbachir.org/2007/01/18/backup-script-from-jon-mills/</guid>
		<description><![CDATA[ibiblio colleague and systems guru John Mills writes: So, I remember you had a cute backup script for OS X. Well I have an external USB drive, which I don&#8217;t want active all the time. My script runs from a cronjob, and automatically mounts and unmounts the external drive, and uses rsync to copy the [...]]]></description>
			<content:encoded><![CDATA[<p><a title="ibiblio" href="http://ibiblio.org/">ibiblio</a> colleague and systems guru <a href="http://claimid.com/jonmills">John Mills</a> writes:</p>
<div style="margin-left: 40px">So, I remember you had a <a href="http://blog.johnjosephbachir.org/2006/01/02/my-backup-scripts/">cute backup script</a> for OS X.  Well I have an external USB drive, which I don&#8217;t want active all the time.  My script runs from a cronjob, and automatically mounts and unmounts the external drive, and uses rsync to copy the files.</div>
<p>Here&#8217;s the script, called backup.sh:</p>
<p>[bash]<br />
#! /bin/bash</p>
<p># Definitions<br />
DISK=disk1s1<br />
DIR_NAME=jonmills<br />
SOURCE=/Users/${DIR_NAME}/<br />
DEST=/Volumes/Backup/${DIR_NAME}/<br />
EXCLUDE=/var/log/backup/excludes.${DIR_NAME}</p>
<p># Mount a disk by hand with disktool<br />
/usr/sbin/disktool -m ${DISK}</p>
<p># Wait for the disk to spin up, or else this won&#8217;t work<br />
sleep 10</p>
<p># Copy the files with rsync<br />
/usr/bin/rsync -av \<br />
&#8211;delete \<br />
&#8211;delete-excluded \<br />
&#8211;exclude-from=${EXCLUDE} \<br />
${SOURCE} \<br />
${DEST}</p>
<p># Unmount the disk manually with disktool<br />
/usr/sbin/disktool -u ${DISK}<br />
[/bash]</p>
<p>crontab looks like this:</p>
<p>[code]<br />
#<br />
# min   hour    mday    month   wday    command</code></p>
<p># Run the script at 4:30 AM and mail me the log<br />
30     4       *       *       *       ~/.backup.sh 2>&#038;1 | mail -s "Backup Log - `date`" _____@gmail.com<br />
[/code]</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.johnjosephbachir.org/2007/01/18/backup-script-from-jon-mills/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

