www.delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-Spam-Check-By: | sourceware.org |
To: | cygwin AT cygwin DOT com |
From: | Andrew Schulman <schulman DOT andrew AT epamail DOT epa DOT gov> |
Subject: | Re: Feature request: rm to recycle bin |
Date: | Mon, 12 May 2008 10:53:24 -0400 |
Lines: | 16 |
Message-ID: | <qblg249t948574qmutd4lgn40q6rfslac5@4ax.com> |
References: | <48258BCC DOT 9090905 AT sdkennedy DOT com> <20080510195121 DOT GM18799 AT calimero DOT vinschen DOT de> |
Mime-Version: | 1.0 |
X-Archive: | encrypt |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
> > Given that the code for sending to recycyle bin is already in place, may I > > request that a command line option be added to rm and rmdir to send all > > files to the bin? This would be extremely handy for use in scripts, to me > > at the very least. > > The code to move files into the bin is an underlying, hidden feature of > the unlink(2), rmdir(2) and rename(2) POSIX calls. The rm(1) tool has > no access to this functionality and there's no intention to add a > non-POSIX API to allow any tool to use it. There is a library called libtrash that implements a trash can for GNU/Linux by intercepting the above calls: http://pages.stern.nyu.edu/~marriaga/software/libtrash/ . No one has packaged it for Cygwin. It requires the use of LD_PRELOAD, which I believe is supposed to work in Cygwin, although I've never tried to use it. Hm... might be interesting to try... I'll look at it. A. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |