View a list of recent deleted items from Trash in macOSFolder cannot be deleted from TrashShould I delete the “Recovered Items” folder?View trash sorted by date deletedShow a single hidden folder in FinderDeleting a 'No such file or directory' fileEmpty trash with open files, MacOs SierraSome items in the Trash cannot be deleted because of System Integrity ProtectionHiding items from the Applications folder without touching themDeleted items don't go into trashFolders in trash won't get deleted? Says they are “in use”
Why isn't pressure filtration popular compared to vacuum filtration?
Has anyone in space seen or photographed a simple laser pointer from Earth?
Credit score and financing new car
Why queuable apex accepts sobjects where as future methods doesn't?
What steps should I take to lawfully visit the United States as a tourist immediately after visiting on a B-1 visa?
How to ask for a LinkedIn endorsement?
How can I calculate the sum of 2 random dice out of a 3d6 pool in AnyDice?
Optimization terminology: "Exact" v. "Approximate"
C program to parse source code of another language
For a hashing function like MD5, how similar can two plaintext strings be and still generate the same hash?
Mathematica notebook opening off the screen
Why doesn't sea level show seasonality?
Graduate student with abysmal English writing skills, how to help
Is the genetic term "polycistronic" still used in modern biology?
Received a dinner invitation through my employer's email, is it ok to attend?
How to evolve human-like eyes that can stare at the sun without protection?
Is there a strong legal guarantee that the U.S. can give to another country that it won't attack them?
How do you glue a text to a point?
How would vampires avoid contracting diseases?
Why isn't there research to build a standard lunar, or Martian mobility platform?
How many hours would it take to watch all of Doctor Who?
Is a request to book a business flight ticket for a graduate student an unreasonable one?
Combining latex input and sed
Does throwing a penny at a train stop the train?
View a list of recent deleted items from Trash in macOS
Folder cannot be deleted from TrashShould I delete the “Recovered Items” folder?View trash sorted by date deletedShow a single hidden folder in FinderDeleting a 'No such file or directory' fileEmpty trash with open files, MacOs SierraSome items in the Trash cannot be deleted because of System Integrity ProtectionHiding items from the Applications folder without touching themDeleted items don't go into trashFolders in trash won't get deleted? Says they are “in use”
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I've deleted some big folders yesterday while on a shoot, to free up some space to be able to shoot tethered into the Mac. The folders where from past shoots and I've marked the folders to know which I had backed up in several places - just to be able to be on shoots and delete if necessary.
But, yesterday things went quick and I'm not sure if one folder got mixed with the others. So today I'm looking for a way to just see which folder/items I deleted/emptied from the Trash.
Logs, Terminal commands etc.?
Every Google search gets me to recovery posts.
macos terminal sierra trash
add a comment |
I've deleted some big folders yesterday while on a shoot, to free up some space to be able to shoot tethered into the Mac. The folders where from past shoots and I've marked the folders to know which I had backed up in several places - just to be able to be on shoots and delete if necessary.
But, yesterday things went quick and I'm not sure if one folder got mixed with the others. So today I'm looking for a way to just see which folder/items I deleted/emptied from the Trash.
Logs, Terminal commands etc.?
Every Google search gets me to recovery posts.
macos terminal sierra trash
add a comment |
I've deleted some big folders yesterday while on a shoot, to free up some space to be able to shoot tethered into the Mac. The folders where from past shoots and I've marked the folders to know which I had backed up in several places - just to be able to be on shoots and delete if necessary.
But, yesterday things went quick and I'm not sure if one folder got mixed with the others. So today I'm looking for a way to just see which folder/items I deleted/emptied from the Trash.
Logs, Terminal commands etc.?
Every Google search gets me to recovery posts.
macos terminal sierra trash
I've deleted some big folders yesterday while on a shoot, to free up some space to be able to shoot tethered into the Mac. The folders where from past shoots and I've marked the folders to know which I had backed up in several places - just to be able to be on shoots and delete if necessary.
But, yesterday things went quick and I'm not sure if one folder got mixed with the others. So today I'm looking for a way to just see which folder/items I deleted/emptied from the Trash.
Logs, Terminal commands etc.?
Every Google search gets me to recovery posts.
macos terminal sierra trash
macos terminal sierra trash
edited Jul 2 at 12:37
Nimesh Neema
22.6k9 gold badges59 silver badges91 bronze badges
22.6k9 gold badges59 silver badges91 bronze badges
asked Jul 2 at 12:27
LissomikkLissomikk
162 bronze badges
162 bronze badges
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
This following solution will not help you retrieve the filenames which were already removed from the trash, before implementing my solution. However you can use this solution to retrieve the filenames removed from the trash, in the future if you need to.
This AppleScript code works for me using the latest version of macOS Mojave.
You can attach a "Removing Items From" folder action to the /Users/YOUR SHORT NAME/.Trash folder that will write to file, the names of the files that were removed from the trash.
Create a new Script Editor document and insert this following AppleScript code.
on removing folder items from theFolder after losing removedItemNames
writeToTheFile(removedItemNames)
end removing folder items from
on writeToTheFile(removedItemNames)
set theFile to POSIX path of (((path to desktop as text) & "Removed From Trash.txt") as text)
set text item delimiters to linefeed
set theText to (removedItemNames as text)
try
set writeToFile to open for access theFile with write permission
write theText & linefeed to writeToFile as text starting at eof
close access theFile
on error errMsg number errNum
close access theFile
set writeToFile to open for access theFile with write permission
write theText & linefeed to writeToFile as text starting at eof
close access theFile
end try
end writeToTheFile
Next, save your new Script Editor document as "Removed From Trash Folder Action.scpt" to the folder... "/Users/YOUR SHORT NAME/Library/Workflows/Applications/Folder Actions/". Saving it to that location will add it to the list of scripts you can attach to folders in the Folder Actions Setup, which can be accessed when right clicking a folder in Finder, in the Services contextual menu.

Before you will be able to attach a folder action to the Trash folder, because the Trash folder is "hidden", you will first need to run this following AppleScript code to unhide all hidden files.
do shell script "defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder"
After all is said and done, if you want to re-hide all originally hidden files, just run this following AppleScript code to hide all hidden files.
do shell script "defaults write com.apple.finder AppleShowAllFiles FALSE
killall Finder"
Here is a look at the Folder Action creating the text file with the names of removed files from the trash

2
If running macOS Sierra or later, one does not need to use thedefaultscommand to reveal the.Trashfolder in one's Home folder. In Finder, simple press the keyboard shortcut Shift-Command-Period (⇧⌘.) to show/hide the.Trashfolder.
– user3439894
Jul 2 at 19:43
1
BTW Why are you declaringglobal removedItemNameswhen it's not necessary to do so? Since inremoving folder items fromyou pass it directly towriteToTheFile(removedItemNames)and it's used nowhere else, there is no declaration of any sort needed.
– user3439894
Jul 3 at 1:56
@user3439894 Declaring theglobalvariable was necessary in the original, much longer version of the AppleScript code. After chewing off the fat through several revisions, it turns out that the final posted code, indeed no longer needs theglobaldeclaration. Good looking out!
– wch1zpink
Jul 3 at 3:50
add a comment |
To the best of my knowledge macOS does NOT log what files were deleted so there is no way to see what was done.
Your best bet now is to stop using your Mac until you get this issue resolved.
Why? Because any time you use your Mac files are written to the drive. And when you delete something the location on the hard drive that the file(s) occupied is marked as free (rather than used/occupied). So anything you save to the disk subsequently could overwrite those files, including just opening a web page. As web pages are cached (or saved to) the drive.
If you have a backup of those files go get them from a backup. If you don't and the files are no longer in the trash get yourself some file recovery software, install it on another Mac and put the Mac in question into target disk mode (so you are not writing anything to the disk) and look for deleted files.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
This following solution will not help you retrieve the filenames which were already removed from the trash, before implementing my solution. However you can use this solution to retrieve the filenames removed from the trash, in the future if you need to.
This AppleScript code works for me using the latest version of macOS Mojave.
You can attach a "Removing Items From" folder action to the /Users/YOUR SHORT NAME/.Trash folder that will write to file, the names of the files that were removed from the trash.
Create a new Script Editor document and insert this following AppleScript code.
on removing folder items from theFolder after losing removedItemNames
writeToTheFile(removedItemNames)
end removing folder items from
on writeToTheFile(removedItemNames)
set theFile to POSIX path of (((path to desktop as text) & "Removed From Trash.txt") as text)
set text item delimiters to linefeed
set theText to (removedItemNames as text)
try
set writeToFile to open for access theFile with write permission
write theText & linefeed to writeToFile as text starting at eof
close access theFile
on error errMsg number errNum
close access theFile
set writeToFile to open for access theFile with write permission
write theText & linefeed to writeToFile as text starting at eof
close access theFile
end try
end writeToTheFile
Next, save your new Script Editor document as "Removed From Trash Folder Action.scpt" to the folder... "/Users/YOUR SHORT NAME/Library/Workflows/Applications/Folder Actions/". Saving it to that location will add it to the list of scripts you can attach to folders in the Folder Actions Setup, which can be accessed when right clicking a folder in Finder, in the Services contextual menu.

Before you will be able to attach a folder action to the Trash folder, because the Trash folder is "hidden", you will first need to run this following AppleScript code to unhide all hidden files.
do shell script "defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder"
After all is said and done, if you want to re-hide all originally hidden files, just run this following AppleScript code to hide all hidden files.
do shell script "defaults write com.apple.finder AppleShowAllFiles FALSE
killall Finder"
Here is a look at the Folder Action creating the text file with the names of removed files from the trash

2
If running macOS Sierra or later, one does not need to use thedefaultscommand to reveal the.Trashfolder in one's Home folder. In Finder, simple press the keyboard shortcut Shift-Command-Period (⇧⌘.) to show/hide the.Trashfolder.
– user3439894
Jul 2 at 19:43
1
BTW Why are you declaringglobal removedItemNameswhen it's not necessary to do so? Since inremoving folder items fromyou pass it directly towriteToTheFile(removedItemNames)and it's used nowhere else, there is no declaration of any sort needed.
– user3439894
Jul 3 at 1:56
@user3439894 Declaring theglobalvariable was necessary in the original, much longer version of the AppleScript code. After chewing off the fat through several revisions, it turns out that the final posted code, indeed no longer needs theglobaldeclaration. Good looking out!
– wch1zpink
Jul 3 at 3:50
add a comment |
This following solution will not help you retrieve the filenames which were already removed from the trash, before implementing my solution. However you can use this solution to retrieve the filenames removed from the trash, in the future if you need to.
This AppleScript code works for me using the latest version of macOS Mojave.
You can attach a "Removing Items From" folder action to the /Users/YOUR SHORT NAME/.Trash folder that will write to file, the names of the files that were removed from the trash.
Create a new Script Editor document and insert this following AppleScript code.
on removing folder items from theFolder after losing removedItemNames
writeToTheFile(removedItemNames)
end removing folder items from
on writeToTheFile(removedItemNames)
set theFile to POSIX path of (((path to desktop as text) & "Removed From Trash.txt") as text)
set text item delimiters to linefeed
set theText to (removedItemNames as text)
try
set writeToFile to open for access theFile with write permission
write theText & linefeed to writeToFile as text starting at eof
close access theFile
on error errMsg number errNum
close access theFile
set writeToFile to open for access theFile with write permission
write theText & linefeed to writeToFile as text starting at eof
close access theFile
end try
end writeToTheFile
Next, save your new Script Editor document as "Removed From Trash Folder Action.scpt" to the folder... "/Users/YOUR SHORT NAME/Library/Workflows/Applications/Folder Actions/". Saving it to that location will add it to the list of scripts you can attach to folders in the Folder Actions Setup, which can be accessed when right clicking a folder in Finder, in the Services contextual menu.

Before you will be able to attach a folder action to the Trash folder, because the Trash folder is "hidden", you will first need to run this following AppleScript code to unhide all hidden files.
do shell script "defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder"
After all is said and done, if you want to re-hide all originally hidden files, just run this following AppleScript code to hide all hidden files.
do shell script "defaults write com.apple.finder AppleShowAllFiles FALSE
killall Finder"
Here is a look at the Folder Action creating the text file with the names of removed files from the trash

2
If running macOS Sierra or later, one does not need to use thedefaultscommand to reveal the.Trashfolder in one's Home folder. In Finder, simple press the keyboard shortcut Shift-Command-Period (⇧⌘.) to show/hide the.Trashfolder.
– user3439894
Jul 2 at 19:43
1
BTW Why are you declaringglobal removedItemNameswhen it's not necessary to do so? Since inremoving folder items fromyou pass it directly towriteToTheFile(removedItemNames)and it's used nowhere else, there is no declaration of any sort needed.
– user3439894
Jul 3 at 1:56
@user3439894 Declaring theglobalvariable was necessary in the original, much longer version of the AppleScript code. After chewing off the fat through several revisions, it turns out that the final posted code, indeed no longer needs theglobaldeclaration. Good looking out!
– wch1zpink
Jul 3 at 3:50
add a comment |
This following solution will not help you retrieve the filenames which were already removed from the trash, before implementing my solution. However you can use this solution to retrieve the filenames removed from the trash, in the future if you need to.
This AppleScript code works for me using the latest version of macOS Mojave.
You can attach a "Removing Items From" folder action to the /Users/YOUR SHORT NAME/.Trash folder that will write to file, the names of the files that were removed from the trash.
Create a new Script Editor document and insert this following AppleScript code.
on removing folder items from theFolder after losing removedItemNames
writeToTheFile(removedItemNames)
end removing folder items from
on writeToTheFile(removedItemNames)
set theFile to POSIX path of (((path to desktop as text) & "Removed From Trash.txt") as text)
set text item delimiters to linefeed
set theText to (removedItemNames as text)
try
set writeToFile to open for access theFile with write permission
write theText & linefeed to writeToFile as text starting at eof
close access theFile
on error errMsg number errNum
close access theFile
set writeToFile to open for access theFile with write permission
write theText & linefeed to writeToFile as text starting at eof
close access theFile
end try
end writeToTheFile
Next, save your new Script Editor document as "Removed From Trash Folder Action.scpt" to the folder... "/Users/YOUR SHORT NAME/Library/Workflows/Applications/Folder Actions/". Saving it to that location will add it to the list of scripts you can attach to folders in the Folder Actions Setup, which can be accessed when right clicking a folder in Finder, in the Services contextual menu.

Before you will be able to attach a folder action to the Trash folder, because the Trash folder is "hidden", you will first need to run this following AppleScript code to unhide all hidden files.
do shell script "defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder"
After all is said and done, if you want to re-hide all originally hidden files, just run this following AppleScript code to hide all hidden files.
do shell script "defaults write com.apple.finder AppleShowAllFiles FALSE
killall Finder"
Here is a look at the Folder Action creating the text file with the names of removed files from the trash

This following solution will not help you retrieve the filenames which were already removed from the trash, before implementing my solution. However you can use this solution to retrieve the filenames removed from the trash, in the future if you need to.
This AppleScript code works for me using the latest version of macOS Mojave.
You can attach a "Removing Items From" folder action to the /Users/YOUR SHORT NAME/.Trash folder that will write to file, the names of the files that were removed from the trash.
Create a new Script Editor document and insert this following AppleScript code.
on removing folder items from theFolder after losing removedItemNames
writeToTheFile(removedItemNames)
end removing folder items from
on writeToTheFile(removedItemNames)
set theFile to POSIX path of (((path to desktop as text) & "Removed From Trash.txt") as text)
set text item delimiters to linefeed
set theText to (removedItemNames as text)
try
set writeToFile to open for access theFile with write permission
write theText & linefeed to writeToFile as text starting at eof
close access theFile
on error errMsg number errNum
close access theFile
set writeToFile to open for access theFile with write permission
write theText & linefeed to writeToFile as text starting at eof
close access theFile
end try
end writeToTheFile
Next, save your new Script Editor document as "Removed From Trash Folder Action.scpt" to the folder... "/Users/YOUR SHORT NAME/Library/Workflows/Applications/Folder Actions/". Saving it to that location will add it to the list of scripts you can attach to folders in the Folder Actions Setup, which can be accessed when right clicking a folder in Finder, in the Services contextual menu.

Before you will be able to attach a folder action to the Trash folder, because the Trash folder is "hidden", you will first need to run this following AppleScript code to unhide all hidden files.
do shell script "defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder"
After all is said and done, if you want to re-hide all originally hidden files, just run this following AppleScript code to hide all hidden files.
do shell script "defaults write com.apple.finder AppleShowAllFiles FALSE
killall Finder"
Here is a look at the Folder Action creating the text file with the names of removed files from the trash

edited Jul 3 at 3:43
answered Jul 2 at 19:10
wch1zpinkwch1zpink
3,6815 silver badges21 bronze badges
3,6815 silver badges21 bronze badges
2
If running macOS Sierra or later, one does not need to use thedefaultscommand to reveal the.Trashfolder in one's Home folder. In Finder, simple press the keyboard shortcut Shift-Command-Period (⇧⌘.) to show/hide the.Trashfolder.
– user3439894
Jul 2 at 19:43
1
BTW Why are you declaringglobal removedItemNameswhen it's not necessary to do so? Since inremoving folder items fromyou pass it directly towriteToTheFile(removedItemNames)and it's used nowhere else, there is no declaration of any sort needed.
– user3439894
Jul 3 at 1:56
@user3439894 Declaring theglobalvariable was necessary in the original, much longer version of the AppleScript code. After chewing off the fat through several revisions, it turns out that the final posted code, indeed no longer needs theglobaldeclaration. Good looking out!
– wch1zpink
Jul 3 at 3:50
add a comment |
2
If running macOS Sierra or later, one does not need to use thedefaultscommand to reveal the.Trashfolder in one's Home folder. In Finder, simple press the keyboard shortcut Shift-Command-Period (⇧⌘.) to show/hide the.Trashfolder.
– user3439894
Jul 2 at 19:43
1
BTW Why are you declaringglobal removedItemNameswhen it's not necessary to do so? Since inremoving folder items fromyou pass it directly towriteToTheFile(removedItemNames)and it's used nowhere else, there is no declaration of any sort needed.
– user3439894
Jul 3 at 1:56
@user3439894 Declaring theglobalvariable was necessary in the original, much longer version of the AppleScript code. After chewing off the fat through several revisions, it turns out that the final posted code, indeed no longer needs theglobaldeclaration. Good looking out!
– wch1zpink
Jul 3 at 3:50
2
2
If running macOS Sierra or later, one does not need to use the
defaults command to reveal the .Trash folder in one's Home folder. In Finder, simple press the keyboard shortcut Shift-Command-Period (⇧⌘.) to show/hide the .Trash folder.– user3439894
Jul 2 at 19:43
If running macOS Sierra or later, one does not need to use the
defaults command to reveal the .Trash folder in one's Home folder. In Finder, simple press the keyboard shortcut Shift-Command-Period (⇧⌘.) to show/hide the .Trash folder.– user3439894
Jul 2 at 19:43
1
1
BTW Why are you declaring
global removedItemNames when it's not necessary to do so? Since in removing folder items from you pass it directly to writeToTheFile(removedItemNames) and it's used nowhere else, there is no declaration of any sort needed.– user3439894
Jul 3 at 1:56
BTW Why are you declaring
global removedItemNames when it's not necessary to do so? Since in removing folder items from you pass it directly to writeToTheFile(removedItemNames) and it's used nowhere else, there is no declaration of any sort needed.– user3439894
Jul 3 at 1:56
@user3439894 Declaring the
global variable was necessary in the original, much longer version of the AppleScript code. After chewing off the fat through several revisions, it turns out that the final posted code, indeed no longer needs the global declaration. Good looking out!– wch1zpink
Jul 3 at 3:50
@user3439894 Declaring the
global variable was necessary in the original, much longer version of the AppleScript code. After chewing off the fat through several revisions, it turns out that the final posted code, indeed no longer needs the global declaration. Good looking out!– wch1zpink
Jul 3 at 3:50
add a comment |
To the best of my knowledge macOS does NOT log what files were deleted so there is no way to see what was done.
Your best bet now is to stop using your Mac until you get this issue resolved.
Why? Because any time you use your Mac files are written to the drive. And when you delete something the location on the hard drive that the file(s) occupied is marked as free (rather than used/occupied). So anything you save to the disk subsequently could overwrite those files, including just opening a web page. As web pages are cached (or saved to) the drive.
If you have a backup of those files go get them from a backup. If you don't and the files are no longer in the trash get yourself some file recovery software, install it on another Mac and put the Mac in question into target disk mode (so you are not writing anything to the disk) and look for deleted files.
add a comment |
To the best of my knowledge macOS does NOT log what files were deleted so there is no way to see what was done.
Your best bet now is to stop using your Mac until you get this issue resolved.
Why? Because any time you use your Mac files are written to the drive. And when you delete something the location on the hard drive that the file(s) occupied is marked as free (rather than used/occupied). So anything you save to the disk subsequently could overwrite those files, including just opening a web page. As web pages are cached (or saved to) the drive.
If you have a backup of those files go get them from a backup. If you don't and the files are no longer in the trash get yourself some file recovery software, install it on another Mac and put the Mac in question into target disk mode (so you are not writing anything to the disk) and look for deleted files.
add a comment |
To the best of my knowledge macOS does NOT log what files were deleted so there is no way to see what was done.
Your best bet now is to stop using your Mac until you get this issue resolved.
Why? Because any time you use your Mac files are written to the drive. And when you delete something the location on the hard drive that the file(s) occupied is marked as free (rather than used/occupied). So anything you save to the disk subsequently could overwrite those files, including just opening a web page. As web pages are cached (or saved to) the drive.
If you have a backup of those files go get them from a backup. If you don't and the files are no longer in the trash get yourself some file recovery software, install it on another Mac and put the Mac in question into target disk mode (so you are not writing anything to the disk) and look for deleted files.
To the best of my knowledge macOS does NOT log what files were deleted so there is no way to see what was done.
Your best bet now is to stop using your Mac until you get this issue resolved.
Why? Because any time you use your Mac files are written to the drive. And when you delete something the location on the hard drive that the file(s) occupied is marked as free (rather than used/occupied). So anything you save to the disk subsequently could overwrite those files, including just opening a web page. As web pages are cached (or saved to) the drive.
If you have a backup of those files go get them from a backup. If you don't and the files are no longer in the trash get yourself some file recovery software, install it on another Mac and put the Mac in question into target disk mode (so you are not writing anything to the disk) and look for deleted files.
answered Jul 2 at 12:48
Steve ChambersSteve Chambers
16k2 gold badges20 silver badges42 bronze badges
16k2 gold badges20 silver badges42 bronze badges
add a comment |
add a comment |