<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:12pt">rsync is nice, but when your talking 1 million files over 12 users,
your talking serious disk io. 45 minutes per user just to scan through
the list.<br><br>If I can determine if anything needs to be done at all first, before even running rsync, that's a lot of savings.<br><div> </div><span style="font-family: courier;">--- </span><br style="font-family: courier;"><span style="font-family: courier;">Wayne Johnson, | <span style="color: rgb(191, 95, 0);">There are two kinds of people: Those</span> </span><br style="font-family: courier;"><span style="font-family: courier;">3943 Penn Ave. N. | <span style="color: rgb(191, 95, 0);">who say to God, "Thy will be done," </span></span><br style="font-family: courier;"><span style="font-family: courier;">Minneapolis, MN 55412-1908 | <span style="color: rgb(191, 95, 0);">and those to whom God says, "All right, </span></span><br style="font-family: courier;"><span style="font-family: courier;">(612)
522-7003 | <span style="color: rgb(191, 95, 0);">then, have it your way." --C.S. Lewis</span><br></span><div style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"><br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Dave Sherohman <dave@sherohman.org><br>To: tclug-list@mn-linux.org<br>Sent: Wednesday, January 9, 2008 4:57:04 PM<br>Subject: Re: [tclug-list] Finding the date of the newest file in a directory tree<br><br>
On Wed, Jan 09, 2008 at 02:29:19PM -0800, Wayne Johnson wrote:<br>> Anyone know of a quick and easy way to find the date of the newest<br>> file in a directory tree. <br><br>Not entirely "quick" when dealing with a million files, but<br><br>find /some/dir/ -exec ls -l {} \; | awk '{print $6,$7,$8}' | sort -r |
head -1<br><br>will give you the newest file in /some/dir/ (or its subdirectories)<br>along with its modification date and time, assuming your ls lists the<br>date/time in an ascii-sortable format (which mine does: 2008-01-09
00:28).<br><br>> I'm looking for a way to speed up synchronizing file caches between<br>> machines. When you have 1m in files (that's a count, not a size), it<br>> takes quite a while to scan through the whole tree. If we had a<br>> .oldest file in each branch, we could skip that branch if nothing had<br>> changed. Then all we would need to do is scan the tree once to set<br>> these branch-stamps. After that, all the cache machines would have
to<br>> do is walk the tree looking for newer stamps. <br><br>Have you tried rsync? In broad terms, this is the kind of thing it's<br>designed to handle, but I'm not sure whether it's able to detect<br>unmodified directories and skip them or not.<br><br>-- <br>I reckon we are now the only monastry ever that had a dungeon stuffed
with<br>sixteen thousand zombies.<br> - <a target="_blank" href="http://perlmonks.org">perlmonks.org</a><br><br>_______________________________________________<br>TCLUG Mailing List - Minneapolis/St. Paul, Minnesota<br><a ymailto="mailto:tclug-list@mn-linux.org" href="mailto:tclug-list@mn-linux.org">tclug-list@mn-linux.org</a><br><a href="http://mailman.mn-linux.org/mailman/listinfo/tclug-list" target="_blank">http://mailman.mn-linux.org/mailman/listinfo/tclug-list</a><br></div><br></div></div><br>
<hr size=1>Looking for last minute shopping deals? <a href="http://us.rd.yahoo.com/evt=51734/*http://tools.search.yahoo.com/newsearch/category.php?category=shopping">
Find them fast with Yahoo! Search.</a></body></html>