Go Back   The macosxhints Forums > OS X Help Requests > System



Reply
 
Thread Tools Rate Thread Display Modes
Old 06-20-2012, 05:03 PM   #1
ruffy
Triple-A Player
 
Join Date: Aug 2007
Posts: 232
Can TRASH Be Sorted by Trashing Date?

I have a mess of files in TRASH, and mistakenly just trashed a file
whose name I forget?

Can I sort by date-trashed and thus easily pick out the file I just mistakenly trashed?

(Using Snow Leopard)
ruffy is offline   Reply With Quote
Old 06-20-2012, 06:22 PM   #2
macosnoob
MVP
 
Join Date: Jan 2007
Posts: 1,751
No, not that I've ever heard of.

Can you remember a relatively uncommon word in the trashed document? If so, drag everything in Trash to a new folder on the Desktop, then use Spotlight to identify the missing document.
macosnoob is online now   Reply With Quote
Old 06-20-2012, 06:25 PM   #3
NaOH
Hall of Famer
 
Join Date: Dec 2007
Posts: 3,642
If you haven't moved, copied or deleted any files in the Finder since moving that specific one to the Trash, Command-Z (Edit > Undo) should move the file back to where it was.
NaOH is offline   Reply With Quote
Old 06-20-2012, 06:58 PM   #4
hayne
Site Admin
 
Join Date: Jan 2002
Location: Montreal
Posts: 31,941
Maybe Time Machine could help.
You could perhaps compare the content of the Trash folder with that in the previous Time Machine backup.
Or (if you know which folder the inadvertently trashed file was in), you could compare the contents of the folder that the file came from.
__________________
hayne.net/macosx.html
hayne is offline   Reply With Quote
Old 06-20-2012, 07:05 PM   #5
ruffy
Triple-A Player
 
Join Date: Aug 2007
Posts: 232
Too bad. 'Cause I remember nothing but that an hour earlier I trashed it, and hadn't emptied the trash in a long time.

You'd think capturing time of the trashing ought to be at least as easy as capturing date-modified, etc. Surely I am not the 1st to have this simplest of problems.

Would "Lion" help me here?
ruffy is offline   Reply With Quote
Old 06-22-2012, 12:13 PM   #6
morespace54
Triple-A Player
 
Join Date: May 2006
Posts: 127
Quote:
Originally Posted by ruffy
...You'd think capturing time of the trashing ought to be at least as easy as capturing date-modified, etc...

Right, but keep in mind that the file wasn't "modified" per-se. Moving a file/folder from one place to another (including the Trash folder), doesn't modify the file itself, therefore, the date of the last modification won't change.

Quote:
Originally Posted by ruffy
...Would "Lion" help me here?

No, unfortunately. And I wouldn't hold my breath for ML neither.
morespace54 is offline   Reply With Quote
Old 06-23-2012, 12:30 AM   #7
ganbustein
MVP
 
Join Date: Apr 2008
Location: Berkeley CA USA
Posts: 1,010
Quote:
Originally Posted by morespace54
Right, but keep in mind that the file wasn't "modified" per-se. Moving a file/folder from one place to another (including the Trash folder), doesn't modify the file itself, therefore, the date of the last modification won't change.

The modification date of which file? Remember, the problem is that the Trash has many many files, and you're trying to pick one of them out.

Hmmm... Actually, that might be a step in the right direction. Ask Spotlight to find a folder whose modification date matches the modification date of the Trash. Moving a file from one folder to another changes the modify date of both folders together. Then ask TM to show you before/after images of that folder.

Can't get it to work, though. When I move a file from folder X to the Trash, mdls shows me that both folders have matching values for kMDItemFSContentChangeDate, but I can't get mdfind to find either one of them via that value.
ganbustein is offline   Reply With Quote
Old 06-23-2012, 02:03 AM   #8
hayne
Site Admin
 
Join Date: Jan 2002
Location: Montreal
Posts: 31,941
Quote:
Originally Posted by ganbustein
Can't get it to work, though. When I move a file from folder X to the Trash, mdls shows me that both folders have matching values for kMDItemFSContentChangeDate, but I can't get mdfind to find either one of them via that value.

Not sure, but maybe you need to use a different format for the timestamp - 'mdfind' doesn't necessarily use the same format as displayed by 'mdls'.

I seem to be able to find folders that have changed with a command like this:
Code:
mdfind 'kMDItemFSContentChangeDate >= $time.iso(2012-06-23_0237_00)'
(following the syntax from: https://developer.apple.com/library/...eryFormat.html )
__________________
hayne.net/macosx.html
hayne is offline   Reply With Quote
Old 06-21-2012, 05:40 AM   #9
ganbustein
MVP
 
Join Date: Apr 2008
Location: Berkeley CA USA
Posts: 1,010
Quote:
Originally Posted by hayne
Maybe Time Machine could help.
You could perhaps compare the content of the Trash folder with that in the previous Time Machine backup.

Won't work. Trash is one of the things Time Machine doesn't back up. It's on a par with logs, caches, and temp folders.

In the case of Trash, TM's rationale is that whatever you put in the trash was already backed up wherever you moved it from. There's not much payoff in making yet another backup of something you've expressly said you have little interest in keeping. (And it would be another copy. TM doesn't record in the backup the original file's inode number, and so has no way of matching up a renamed file with a previous backup of it.)
ganbustein is offline   Reply With Quote
Old 08-13-2012, 05:00 PM   #10
sojourner
Major Leaguer
 
Join Date: Apr 2010
Posts: 330
For future readers, Hazel has a 'Date Added' criteria, allowing the user to select actions to be performed on items based on when the items were added to the specified folder.

I just tested it with the Trash folder, telling Hazel to change the label of all files added to Trash within the past 62 minutes to green. Works beautifully. Hazel isn't free, but it's well worth the price.
__________________
see a problem; solve a problem.
sojourner is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 09:46 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.