Date: Wed, 19 Oct 2011 21:32:39 +0200 From: Andy Wodfer <wodfer@gmail.com> To: freebsd-questions <freebsd-questions@freebsd.org> Subject: Re: Help! Can't delete files ... Message-ID: <CABgB0xTPzcE1OvgpTJkRdDR-QY046kU5Kk-am7EX4D=LHu2%2B6A@mail.gmail.com> In-Reply-To: <201110191904.p9JJ4Ago092104@mail.r-bonomi.com> References: <CABgB0xQxYMM91OcBBVGHLB=Px4z4b=bxRnj=gbvbaU1GRTZRQQ@mail.gmail.com> <201110191904.p9JJ4Ago092104@mail.r-bonomi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Oct 19, 2011 at 9:04 PM, Robert Bonomi <bonomi@mail.r-bonomi.com>wrote: > A) learn to use wildcards. > I know how to use wildcards, but I forgot to tell in my first email that there are 4 files that have almost the same filenames, so I couldn't do it this way. > B) learn to use the '-i' option to rm > C) learn to use 'echo' to 'test' filename expansions. > Thanks! Very useful info. For your 'problem' files, put a '?' in anywhere there is a space or a > 'strange character'. Check what happens using echo, then use 'rm -i', so > you make sure that you delete *only* the particular file you intend to. > > e.g. for the specific file you cited above try: > > echo 28b?Kjoepesenter?n?ringsg?rdeier.docx > > *ASSUMING* that that shows; > 28b Kjoepesenter n<91>ringsg<86>rdeier.docx > > then try: > rm -i 28b?Kjoepesenter?n?ringsg?rdeier.docx > > Assuming that it asks yout about deleting the full file name, type a 'y'. > > Repeat for each 'problem' file. Thanks a lot! That did it! :-) Cheers, Andy
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABgB0xTPzcE1OvgpTJkRdDR-QY046kU5Kk-am7EX4D=LHu2%2B6A>