Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Sep 2008 22:17:40 -0500
From:      Erik Osterholm <freebsd-lists-erik@erikosterholm.org>
To:        Noah <admin2@enabled.com>
Cc:        User Questions <freebsd-questions@freebsd.org>
Subject:   Re: cd and rm a directory with '^M'
Message-ID:  <20080904031740.GA37290@aleph.cepheid.org>
In-Reply-To: <48BF3F0F.6030606@enabled.com>
References:  <48BF3F0F.6030606@enabled.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Sep 03, 2008 at 06:51:11PM -0700, Noah wrote:
> Hi there,
> 
> I had rsync create a directory with a '^M' in it.
> 
> how do I rm -rf the directory?
> 
> Cheers,
> Noah

There are multiple possibilities:
1) Use a shell which supports tab completion, and tab-complete the
entry.
2) Embed the '^M' using '^V''^M' (type ctrl-v then ctrl-m.)
3) Use shell globbing (if the file is abra^Mcadabra, type:
    ls abra*
    rm abra* (only if the above matched exactly what you want to delete.)

Erik



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