Date: Wed, 12 Feb 2003 12:59:18 -0800 From: Kent Stewart <kstewart@owt.com> To: Ruben de Groot <fbsd-q@bzerk.org> Cc: parv <parv_fm@emailgroups.net>, David Banning <david@skytracker.ca>, questions@FreeBSD.ORG Subject: Re: how to delete a file called ???? Message-ID: <200302121259.18010.kstewart@owt.com> In-Reply-To: <20030212204251.GA74324@ei.bzerk.org> References: <20030212111232.A6759@skytrackercanada.com> <200302121145.33271.kstewart@owt.com> <20030212204251.GA74324@ei.bzerk.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 12 February 2003 12:42 pm, Ruben de Groot wrote: > On Wed, Feb 12, 2003 at 11:45:33AM -0800, Kent Stewart typed: > > On Wednesday 12 February 2003 11:21 am, parv wrote: > > > in message <20030212111232.A6759@skytrackercanada.com>, > > > wrote David Banning thusly... > > > > > > > I have a file called ??????????????? > > > > > > ... > > > > > > > I can't seem to clean it away. > > > > > > > > rm ???????? > > > > rm '????????' > > > > rm "????????" > > > > > > > > all do not work. > > > > > > try something like... > > > > > > find . -inum $( /bin/ls -i | fgrep '?' | awk '{print $1}' ) > > > -print0 \ > > > > > > | xargs -0 rm -f > > > > That is a lot of work when you could have just > > > > rm -- ??????????????? > > This will delete all files that have a name the length of 15 > characters. > > > The "--" tells rm that what follows is a file name. > > But first, the ?'s are expanded by the shell to match any file with a > name of 15 characters. I had always used the -i to go along with it. I tried it with ??? and abc and a "rm -- ???" deleted both files, which wasn't what I expected if wildcarding was turned off with the "--". Kent > > > Kent > > > > -- > > Kent Stewart > > Richland, WA > > > > http://users.owt.com/kstewart/index.html > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-questions" in the body of the message > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message -- Kent Stewart Richland, WA http://users.owt.com/kstewart/index.html To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302121259.18010.kstewart>