FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 06-25-2011, 09:44 AM
Ralf Mardorf
 
Default debian-user-digest Digest V2011 #1215

On Sat, 2011-06-25 at 09:39 +0000,
debian-user-digest-request@lists.debian.org wrote:
> On 25/06/11 17:15, Andrew McGlashan wrote:
> > Hi,
> >
> > Ralf Mardorf wrote:
> >> $ echo test > *
> >> $ ls
> >> * Desktop Downloads hdsp.1
> >>
> >> Any idea how I can get rid of the file named *?
> >
> > # touch * &
> > # ls
> > * &
> > # find . -type f -name "*" -print0|xargs -0 rm
> > # ls
> >
> >
> > # touch * &
> > # find . -type f -name "&" -print0|xargs -0 rm
> > # ls
> > *
> >
> >
> > # touch * &
> > # ls
> > * &
> > # find . -type f -name "&" -print0|xargs -0 rm;ls
> *
> > # find . -type f -name "*" -print0|xargs -0 rm;ls
> >
> >
> > Cheers
> >
>
> Bigger hammer....
>
> scott@work:~/spec$ touch "*" "&"
> scott@work:~/spec$ ls -A
> * &
> scott@work:~/spec$ rm `ls -A`
> rm: cannot remove `&': No such file or directory
> scott@work:~/spec$ ls -a
> . ..
>
>
> Cheers
>
>
>


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1308995076.17986.73.camel@debian">http://lists.debian.org/1308995076.17986.73.camel@debian
 
Old 06-25-2011, 09:55 AM
Ralf Mardorf
 
Default debian-user-digest Digest V2011 #1215

> > On 25/06/11 17:15, Andrew McGlashan wrote:
> > > Hi,
> > >
> > > Ralf Mardorf wrote:
> > >> $ echo test > *
> > >> $ ls
> > >> * Desktop Downloads hdsp.1
> > >>
> > >> Any idea how I can get rid of the file named *?
> > >
> > > # touch * &
> > > # ls
> > > * &
> > > # find . -type f -name "*" -print0|xargs -0 rm
> > > # ls
> > >
> > >
> > > # touch * &
> > > # find . -type f -name "&" -print0|xargs -0 rm
> > > # ls
> > > *
> > >
> > >
> > > # touch * &
> > > # ls
> > > * &
> > > # find . -type f -name "&" -print0|xargs -0 rm;ls
> > > *
> > > # find . -type f -name "*" -print0|xargs -0 rm;ls
> > >
> > >
> > > Cheers
> > >
> >
> > Bigger hammer....
> >
> > scott@work:~/spec$ touch "*" "&"
> > scott@work:~/spec$ ls -A
> > * &
> > scott@work:~/spec$ rm `ls -A`
> > rm: cannot remove `&': No such file or directory
> > scott@work:~/spec$ ls -a
> > . ..
> >
> >
> > Cheers

Hehe, I'm jobless (= having more time) and pissed (by wine, not the
software, but the drink) at the moment, that's my excuse to do similar
experiments. What's your excuse ;D?

I guess I stop now, to avoid that I randomly run

$su
# cd /
# rm *

and then need to restore backups.

Globbing can be very entertaining, but before we go on writing mails
regarding to funny issues, we should add a note, to prevent very
inexperienced Debian users against disasters.

2 Cents,

Ralf


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1308995756.17986.83.camel@debian">http://lists.debian.org/1308995756.17986.83.camel@debian
 

Thread Tools




All times are GMT. The time now is 06:21 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org