Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Use OS X's trash in a Finder-like way from Terminal' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use OS X's trash in a Finder-like way from Terminal
Authored by: mb2696 on Apr 23, '10 08:31:09AM

Also, if a file is deleted and another file with the same name already exists in the trash, it will be overwritten. Finder tacks a number on the end...



[ Reply to This | # ]
Use OS X's trash in a Finder-like way from Terminal
Authored by: SeanAhern on Apr 23, '10 06:31:11PM

Duplicates shouldn't be overwritten. The core 'mv' command from the script has a -n flag, which tells 'mv' to "not overwrite an existing file". I believe the script will just fail.

I agree that having some kind of sequence number would be useful.



[ Reply to This | # ]
Won't fail when file exists in trash
Authored by: GaelicWizard on Apr 24, '10 11:06:14AM

This script will not "just fail" if there is already an identically-named file in the trash. Instead, it will rename the more-recent file (the one being trashed presently) by prepending the date.

The hint explicitly states this. Re-read it if you missed it.

Edited on Apr 24, '10 11:08:41AM by GaelicWizard



[ Reply to This | # ]
Will not overwrite files already in trash
Authored by: GaelicWizard on Apr 24, '10 11:05:01AM

That's not true. This script will deliberately not overwrite an already-existing file. Instead, it will rename the more-recent file by prepending the date.

The hint explicitly states this. Re-read it if you missed it.

Edited on Apr 24, '10 11:07:09AM by GaelicWizard



[ Reply to This | # ]