From: unruh on 10 Apr 2010 22:40 On 2010-04-11, Chris F.A. Johnson <cfajohnson(a)gmail.com> wrote: > On 2010-04-11, unruh wrote: >> On 2010-04-11, Deinonychus Antirrhopus <velociraptorinae.deinonychus(a)googlemail.com> wrote: >>> On Sun, 11 Apr 2010 02:29:46 +0200, Sidney Lambe wrote: >>> >>>> (Must be a KDE/Gnome user.) >>> >>> Otherwise he would have much more trouble recovering his file. >>> >> >> Well, I have in .bashrc >> function rm () { cp $* /tmp; /bin/rm $* ;} > > ...which will fail if any filenames contain whitespace. > > rm() { cp "$@" /tmp; /bin/rm "$@"; } Of course I have files which contain whitespace, but thanks.
From: Jean-David Beyer on 11 Apr 2010 08:02 Uno wrote: > $ locate gfortran.pdf > /home/dan/.local/share/Trash/files/gfortran/doc/gfortran.pdf > $ > > How do I get this file back? If you deleted it (presumably with the rm command), just restore it from your backup device. -- .~. Jean-David Beyer Registered Linux User 85642. /V\ PGP-Key: 9A2FC99A Registered Machine 241939. /( )\ Shrewsbury, New Jersey http://counter.li.org ^^-^^ 08:00:01 up 11 days, 21:26, 3 users, load average: 4.31, 4.52, 4.55
From: Uno on 11 Apr 2010 22:10 Jean-David Beyer wrote: > Uno wrote: >> $ locate gfortran.pdf >> /home/dan/.local/share/Trash/files/gfortran/doc/gfortran.pdf >> $ >> >> How do I get this file back? > > If you deleted it (presumably with the rm command), just restore it from > your backup device. > Thanks all for responses, in particular the ones that showed other ways to do the same thing. These will enter my linuxlog. -- Uno
From: Uno on 11 Apr 2010 22:58 Sidney Lambe wrote: > On comp.os.linux.misc, Keith Keller > <kkeller-usenet(a)wombat.san-francisco.ca.us> wrote: > >> On 2010-04-11, Sidney Lambe <sidneylambe(a)nospam.invalid> wrote: >> >>> Filenames with whitespaces is a Windows idiocy. >> Not all of us are fortunate enough not to work with Windows >> idiots. >> >>> I don't allow them on my box. >> What, you have a badly-written shell script that scans every >> filename as it's written? Either that or you have no friends >> and therefore don't need any way of enforcing no spaces in >> filenames. > > Another dickless punk who takes cheap shots at people while > he hides behind the Internet. > > In the real world this loser would call me "sir" when he > was finished mowing my lawn. > > <plonk> I'll thank you not to make remarks like the above on my threads. -- Uno
From: Uno on 11 Apr 2010 23:02
Sidney Lambe wrote: > On comp.os.linux.misc, Sidney Lambe <sidneylambe(a)nospam.invalid> wrote: >> On comp.os.linux.misc, Uno <merrilljensen(a)q.com> wrote: >>> $ locate gfortran.pdf >>> /home/dan/.local/share/Trash/files/gfortran/doc/gfortran.pdf >>> $ >>> >>> How do I get this file back? >>> -- >>> Uno >> Are you serious? >> (Must be a KDE/Gnome user.) >> >> Back where? >> >> mv /home/dan/.local/share/Trash/files/gfortran/doc/gfortran.pdf \ >> <destination dir> >> >> Sid > > Why not make it even easier? > > mv $(locate gfortran.pdf) <destination directory> > > The $() tells bash to feed the results of the enclosed command > to mv. > > man mv > $ mv $(locate gfortran.pdf) /home/dan/Desktop mv: will not overwrite just-created `/home/dan/Desktop/gfortran.pdf' with `/home/dan/.local/share/Trash/files/gfortran/doc/gfortran.pdf' mv: `/home/dan/Desktop/gfortran.pdf' and `/home/dan/Desktop/gfortran.pdf' are the same file $ I like the restraint that mv has. -- Uno |