Friday, February 22, 2013

sort find results by date and time


Have you ever wanted to find all the files below your current directory and sort them by thier last modification time? Try this:
find . -printf "%T+\t%p\n" | sort
Here is the breakdown:

%T is file's last modification time in the format specified by k, which is the same as for %A. By the way, %A could be used to sort by access times instead of modification times.

+ means render the date and time, separated by "+", for example "2013-02-22+08:19:06.3877437110".

\t is a tab character

%p is the file name

All of this information and more might be gleaned by typing "man find" and searching for the section describing "printf" and its options.

Hope that helps.

Please help us learn how to do this on a mac (or windows) on the command line without a 20 minute mac ports install.

Saturday, February 02, 2013

Fun family pictures


Hello sushi!


Hello flowers ... peek - a - boo!


Looks delicious.


Froggy


Uh ... mazing Korean food in Diamond Bar, CA.
Young Dong Tofu.   Try their Bipp n' bopp!


Bipp n' Bopp in the lower left stone bowl ... yummmm.


Good-bye :-)

  

Hmm.



Wednesday, January 30, 2013

Dashes or other special characters "confuse" Spotlight on mac osx ...

Have you been trying to figure out why spotlight cannot find a file with a dash in the name?  How much time have you wasted wondering about this?  Well, look no further.  If your problem is something like this:
You know that there is a file on your mac called "something-book.pdf", so like an idiot, thinking that Spotlight will be friendly, you type what you know, -book.pdf, into Spotlight, and the "Top Hit" is "App Store" ... sigh.  You _know_ that the file is there somewhere!  But where is it?  Well, simply try this:

Solution:  Put the fragment of the filename in quotes, and viola, there is your file.  


Why should you have to put it in quotes you ask?  Why wouldn't it automatically default to putting everything in quotes itself, you ask?  Why isn't it more user friendly?  Well the answer is apparently embedded in the logic sourced in this document.

http://developer.apple.com/library/mac/#documentation/Carbon/Conceptual/SpotlightQuery/Concepts/QueryFormat.html

Let me know, when you have memorized that document, and can explain this is layman's terms.  Until then, let's see if you and I are the only two people who have ever experienced any issue with Spotlight.  The comments (or lack thereof) should be very telling.

Hope that helps.

Tuesday, January 22, 2013

Sunday, January 06, 2013

New post ... old picture

It's always fun to find great older pictures.