Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Oct 2005 05:00:39 GMT
From:      Giorgos Keramidas <keramida@freebsd.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/86931: rm wildcards is not rming files with brackets
Message-ID:  <200510060500.j9650dAu003264@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/86931; it has been noted by GNATS.

From: Giorgos Keramidas <keramida@freebsd.org>
To: Jack Low <xxjack12xx@gmail.com>
Cc: bug-followup@freebsd.org
Subject: Re: bin/86931: rm wildcards is not rming files with brackets
Date: Thu, 6 Oct 2005 07:52:51 +0300

 On 2005-10-05 09:04, Jack Low <xxjack12xx@gmail.com> wrote:
 > %rm /*/*/*/*/*/*/*-file-in-this*
 > rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
 > rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
 > rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
 > rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
 > rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
 > rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
 > rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
 > rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
 > rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
 > rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
 > rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
 > rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
 > %
 
 Are you sure this isn't some nasty trick csh(1) plays to you?
 
 Using GNU bash and /bin/sh here I see quite different things:
 
 : $ mkdir /tmp/keramida
 : $ cd /tmp/keramida
 : $ touch '[foo]'
 : $ ls -l
 : total 0
 : -rw-rw-r--  1 keramida  wheel  - 0 Oct  6 07:49 [foo]
 : $ rm *foo*
 : $ ls -l
 : total 0
 : $ env PS1='sh> ' sh
 : sh> pwd
 : /tmp/keramida
 : sh> ls -la
 : total 4
 : drwxrwxr-x   2 keramida  wheel   512 Oct  6 07:49 .
 : drwxrwxrwt  10 root      wheel  1536 Oct  6 07:50 ..
 : sh> touch '[foo]'
 : sh> ls -l
 : total 0
 : -rw-rw-r--  1 keramida  wheel  0 Oct  6 07:50 [foo]
 : sh> rm *foo*
 : sh> ls -l
 : total 0
 : sh>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200510060500.j9650dAu003264>