01-19-06 01:11 PM
On Thu, 19 Jan 2006 09:30:38 GMT, Mr_Bill wrote:
> I have a directory that I copied from a dvd in XP to
> fat32 then copied that directory in linux to my reiser
> home directory.
> It has 13,000 PDF files.
>
> ls | grep [:cntrl:] | cat -n shows 3833 file names
> that have control charachters in them.
No, if there's a file called :, c, n, t, r or l in the current
directory, the shell will change that command line to:
ls | grep r | cat -n
for instance.
If not, it will stay:
ls | grep [:cntrl:] | cat -n
that shows the files whose name contains :, c, n, t, r or l.
If you want to search for control characters, then it's:
ls | grep '[[:cntrl:]]' | cat -nvt
remember "[" is special to the shell, so must be quoted.
>
> How can I view what these control charachters are?
[...]
That's the -v and -t flags.
You can also use od -tc or sed -n l
~$ echo '\a' | od -tc
0000000 \a \n
0000002
~$ echo '\a' | sed -n l
\07
~$ echo '\a' | cat -vt
^G
--
Stephane
[ Post a follow-up to this message ]
|