[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Trash bin for console



The aliases have given me an idea that it should be possible to have some
sort of trash bin (for those who are sentimental: Recycle Bin :-) for the
console. In fact what should be done is alias "rm" or any other suitable
combination not to delete but move the file to e.g. a directory called
/trash or something where it would be stocked until it's deleted. The
alias that should do this could look like:

	alias del='mv -i $1 /trash'

The problem is that I was hoping "$1" would work: del myfile.ps should
move the file to /trash. However $1 is not substituted by the filename
when I type del myfile.ps. Actually with the above alias "mv" wants to
move /trash to myfile.ps. Where's the thinking mistake?


**** Image creation & digital tweaking *****************

ZOKI, Paris		Tel	: + 33 (0)1 42 45 78 13
55 rue de Lancry	Fax	: + 33 (0)1 42 00 60 86
75010 Paris (F)		mailto	: zokiphoto magic fr

**** Creation d'images est traitement numerique ********

Mailed with Linux and Pine.

%% Fin de message / End of message %%





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]