You can use the following ls
switches to detective these types of problems:
-b, --escape
print C-style escapes for nongraphic characters
-q, --hide-control-chars
print ? instead of non graphic characters
--show-control-chars
show non graphic characters as-is (default unless program is `ls' and output is a terminal)
-Q, --quote-name
enclose entry names in double quotes
NOTE: The --show-control-chars
is usually on by default.
Examples:
% touch normal_file
% touch "spacy_file "
% touch "ctrl_file^[^\^]"
NOTE: The 3rd file was created by pressing ...
- hold Ctrl and press V & 3
- hold Ctrl and press V & 4
- hold Ctrl and press V & 5
-lb
% ls -lb
total 0
-rw-rw-r-- 1 saml saml 0 Jan 13 21:22 ctrl_file\033\034\035
-rw-rw-r-- 1 saml saml 0 Jan 13 21:22 normal_file
-rw-rw-r-- 1 saml saml 0 Jan 13 21:22 spacy_file\
-l
% ls -l
total 0
-rw-rw-r-- 1 saml saml 0 Jan 13 21:22 ctrl_file???
-rw-rw-r-- 1 saml saml 0 Jan 13 21:22 normal_file
-rw-rw-r-- 1 saml saml 0 Jan 13 21:22 spacy_file
-q
% ls -q
ctrl_file??? normal_file spacy_file
-lq
% ls -lq
total 0
-rw-rw-r-- 1 saml saml 0 Jan 13 21:22 ctrl_file???
-rw-rw-r-- 1 saml saml 0 Jan 13 21:22 normal_file
-rw-rw-r-- 1 saml saml 0 Jan 13 21:22 spacy_file
-lQ
% ls -lQ
total 0
-rw-rw-r-- 1 saml saml 0 Jan 13 21:22 "ctrl_file\033\034\035"
-rw-rw-r-- 1 saml saml 0 Jan 13 21:22 "normal_file"
-rw-rw-r-- 1 saml saml 0 Jan 13 21:22 "spacy_file "
3Is it possible you have an alias or procedure defined for
cd
? – Nicole Hamilton – 2013-01-14T01:14:38.973YES!!! I had a script that changes the name of the window to the name of the file I was editting!! THANK YOU!!! Overlooked this :( hahaha – kennzors – 2013-01-14T01:21:38.083
Glad I was able to help. Have a great new year. – Nicole Hamilton – 2013-01-14T01:24:50.223