<?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>brian r stuckey &#187; bash</title>
	<atom:link href="http://www.ineedcaffeine.com/content/tag/bash/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ineedcaffeine.com/content</link>
	<description>Startups &#38; Caffeine</description>
	<lastBuildDate>Sat, 04 Feb 2012 19:23:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>I need a little tech help&#8230;</title>
		<link>http://www.ineedcaffeine.com/content/uncategorized/i-need-a-little-tech-help/</link>
		<comments>http://www.ineedcaffeine.com/content/uncategorized/i-need-a-little-tech-help/#comments</comments>
		<pubDate>Fri, 14 Nov 2008 01:21:35 +0000</pubDate>
		<dc:creator>Brian Stuckey</dc:creator>
				<category><![CDATA[Everything]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[help]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://www.ineedcaffeine.com/content/?p=86</guid>
		<description><![CDATA[How can I, using only command line tools, find the newest .jpg file in a given directory? I would like to use that in part of a cron job so I can copy images from my moblog to a common directory with my Word Press instillation. Basically: find the matching image cp /moblog /content/images/latest.jpg embed [...]]]></description>
			<content:encoded><![CDATA[<p>How can I, using only command line tools, find the newest .jpg file in a given directory?  I would like to use that in part of a cron job so I can copy images from my moblog to a common directory with my Word Press instillation.</p>
<p>Basically:</p>
<ol>
<li>find the matching image</li>
<li>cp /moblog /content/images/latest.jpg</li>
<li>embed /content/images/latest.jpg in one of my posts</li>
<li>execute steps 1 &amp; 2 via cron</li>
</ol>
<p>Anyone know how to pull this off?<span id="more-86"></span></p>
<p>EDIT:</p>
<p>The basic command is: <strong>mv `ls -tr | tail -1` ../hereitis.jpg</strong></p>
<p>EDIT2:<br />
Here is the answer</p>
<p>curl http://www.ineedcaffeine.com/moblog/SCRIPT.php<br />
cd /YOURFULLPATHHERE/moblog/images<br />
cp `ls -tr | tail -1`  	/YOURFULLPATHHERE/moblog.jpg<br />
convert /YOURFULLPATHHERE/moblog.jpg -resize 400&#215;400 YOURFULLPATHHERE/moblog_resized.jpg</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ineedcaffeine.com/content/uncategorized/i-need-a-little-tech-help/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

