Re: alias(rm as mv)

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

 



On Mon, Oct 06, 2003 at 06:00:42PM -0300, Herculano de Lima Einloft Neto wrote:
> On Mon, 2003-10-06 at 16:43, Jeff Kinz wrote:
> > Quick solution:
> > here=`pwd`
> >      for i in $*; do
> > 	 absolutename="/${i}"
> 
>  I take it you mean
> 
> absolutename="${here}/${i}" ?

Yes, that was what I intended.  (Still looking for a DWIW IDE. :) )
> 
> This still has one problem: we have to treat deletions with absolute
> pathnames.. there should be a command or something: `fullname`.. :)
> 
> >          dn=`dirname $i`
> >          bn=`basename $i`
> >          name=$dn/$bn
> >          echo $absolutename >> ~/.trashdb;
> >      done
> >      mv -i $* ~/.Trash;
> > 
> > Best bet - append the file being "trashed" to an existing gzipped tar
> > archive. This way the full pathname can be saved with each file nad each
> > file can besaved mutiple times in the archive.  To save pain at a later
> > date you can prepend each pathname with a "date_and_timestamp" making
> > it easier to name each version of the same file uniquely and allow
> > each one to be manipulated individually.
> 
>   I wonder if it would be easy to pull this functionality out of
> nautilus to the command line, since it implements it reasonably well.
> Should be for anyone involved with it.

I dunno.  Seems like you allready have most of what you need.  just
exchange the "mv -i" with "tar -zAF" ~/.Trash.tgz" $asolutename
(appending/prepending the timestamp to the file name is left as an
exercise to the reader.... :-) )

-- 
Jeff Kinz, Open-PC, Emergent Research,  Hudson, MA.  jkinz@xxxxxxxx
copyright 2003.  Use is restricted. Any use is an 
acceptance of the offer at http://www.kinz.org/policy.html.
Don't forget to change your password often.


-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux