[Novalug] Two files with the same name: Hunh?!
Jon LaBadie
novalugml@jgcomp.com
Wed Jan 14 10:15:04 EST 2009
On Wed, Jan 14, 2009 at 05:56:20AM -0500, geoffm wrote:
> Listing directories or files with hidden chars
>
> # ls [pipe] cat -v
>
> will usually list bogus names
I prefer a slight variation of options:
$ ls -1 | cat -vet # (take your cat to the vet :)
The -1 (one, not ell) puts each name on a separate line,
though the pipe should also do that.
The -v option you suggest shows control chars, eg. ^O
but certain chars, notably tabs, do not.
The -t option makes the tabs visible as ^I
The -e option shows the end of each name with a $
and may show trailing spaces eg. funny_name $
If you are using gnu's cat, -A is equivalent to -vet.
Jon
--
Jon H. LaBadie jon@jgcomp.com
JG Computing
12027 Creekbend Drive (703) 787-0884
Reston, VA 20194 (703) 787-0922 (fax)
More information about the Novalug
mailing list