unexpected softupdate inconsistency

Wes Peters wes at softweyr.com
Sun Mar 14 10:19:28 PST 2004


On Thu, 11 Mar 2004 11:31:16 +1100 Peter Jeremy
<peter.jeremy at alcatel.com.au> alleged:

> On 2004-Mar-11 11:14:01 +1100, Gregory Bond <gnb at itga.com.au> wrote:
> >The key phrase here is "What does vim do here _that rm doesn't_?"
> >
> >If vim is also just using unlink() then rm can (theoretically) do the job
> >just as well.  It seems like really odd advice to say "use vim because rm
> >can't do the job."  If this were in any way true, then I'd call that a
> >serious bug in rm.
> 
> If the filename to delete includes non-printing or magic-to-the-shell
> characters (and especially ones with the top bit set), it can be
> difficult to specify the filename as a command-line argument to rm(1).
> In these cases, directory-editing modes in editors (or a scripting
> language like perl) can be very helpful.

Let us not forget 'rm -i *'...  Tedious, perhaps, but it does get the
job done.  'ls -B' may be helpful in identifying why 'rm foobar' doesn't
work on a file apparently named 'foobar'.

wes at zaphod$ touch foo^Bbar		-- entered with ^V^B in bash
wes at zaphod$ ls -lB foo*
-rw-r--r--  1 wes  wes    0 Mar 14 10:18 foo\002bar
-rw-r--r--  1 wes  wes  263 Jul 10  2003 foo.c
wes at zaphod$ rm -i foo*
remove foobar? y
remove foo.c? n

-- 

        Where am I, and what am I doing in this handbasket?

Wes Peters                                               wes at softweyr.com


More information about the freebsd-stable mailing list