Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Dec 2008 19:21:33 -0800
From:      Bill Campbell <freebsd@celestial.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: control character file names
Message-ID:  <20081215032133.GB4812@ayn.mi.celestial.com>
In-Reply-To: <4945BF22.7030606@enabled.com>
References:  <4945BF22.7030606@enabled.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Dec 14, 2008, Noah wrote:
> Hi there,
>
> there is a blank directory that I cant seem to view.  I believe the  
> directory is a '^M'.  can somebody please explain how I can see  
> filenames and directories containing control characters.  Also how do I  
> rename the directory with 'mv'?

There are various ways to handle this.

# this will show the file with special characters escaped
ls | cat -v 

# this will put the output of ls into a file that can then be
# edited with vim so one could insert ``mv '' before the funny
# file name, and `` newname'' after it.
ls > tmpfile

As others have mentioned, using a graphical file manager can make
it easy as well.

Bill
-- 
INTERNET:   bill@celestial.com  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
Voice:          (206) 236-1676  Mercer Island, WA 98040-0820
Fax:            (206) 232-9186

The end move in politics is always to pick up a gun.  -- Buckminster Fuller



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