Saturday, 4 May 2019

Move file to Trash on Snow Leopard from Terminal


Snow Leopard allows users to "Put Back" files that were moved to the Trash from Finder. However, when I do mv ~/.Trash from the command line I don't get the "Put Back" option.


Is there a native command in Snow Leopard that moves a file to the trash while letting me still be able to us "Put Back"?



Answer



When you move a file to the trash OS X updates the .DS_Store file inside ~/.Trash with the "Put back" information. (See this question for more details)


In order to update this you would have to also update the .DS_Store file when you move a file to the Trash in Terminal.


No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...