Trash

trash icon

trash

This is a small command-line program for OS X that moves files or folders to the trash.

By default, trash asks Finder to move the specified files/folders to the trash instead of calling the system API to do this because of the “put back” feature that only works when trashing files through Finder. If you compile trash by running the command make USE_SYSTEM_API=1 the generated build will always first try the system API and only call on Finder to trash files the user lacks access rights for. See my blog post for more info on some initial implementation details and design decisions.

Usage

Here’s the usage info of this program (run it without any arguments to see this):

usage: trash [-ulesv] <file> [<file> ...]  Move files/folders to the trash.  Options to use with <file>:  -v  Be verbose (show files as they are trashed, or if      used with the -l option, show additional information      about the trash contents)  Stand-alone options (to use without <file>):  -u  Check for updates (and optionally auto-update self)  -l  List items currently in the trash (add the -v option      to see additional information)  -e  Empty the trash (asks for confirmation)  -s  Securely empty the trash (asks for confirmation)Version 0.8.2Copyright (c) 2010 Ali Rantakari, http://hasseg.org/trash

OSX rulez!!

Advertisements