cd and rm a directory with '^M'

Giorgos Keramidas keramida at ceid.upatras.gr
Thu Sep 4 03:20:42 UTC 2008


On Wed, 03 Sep 2008 18:51:11 -0700, Noah <admin2 at enabled.com> wrote:
> Hi there,
>
> I had rsync create a directory with a '^M' in it.
>
> how do I rm -rf the directory?

These are a few options:

(1) In most shells, you can type a ^M character as part of a filename by
    prefixing the ^M character with ^V.

(2) Use tab completion.  Type the first part of the filename and hit
    the TAB key.  The shells which support tab completion will fill in
    the remaining bits of the filename in the 'correct' way.

(3) Use a GUI file manager or the `dired' mode of GNU Emacs to delete
    the file.



More information about the freebsd-questions mailing list