control character file names
Giorgos Keramidas
keramida at ceid.upatras.gr
Sun Dec 14 18:29:09 PST 2008
On Sun, 14 Dec 2008 18:21:22 -0800, Noah <admin2 at enabled.com> 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 quite a couple of options:
* Use the -B option of the `ls' utility.
This should print the non-printable characters using octal
numbers, i.e.:
$ touch 'foo^Mbar'
$ /bin/ls -lB foo*
-rw-rw-r-- 1 keramida users 0 Dec 15 04:27 foo\015bar
$
* Use a file manager.
I often use `dired-mode' inside an Emacs session to move around,
copy, re-organize, rename or delete files. Any file manager that
can display several character sets at once will do fine :)
More information about the freebsd-questions
mailing list