"dos2unix" trying to use bad temporary file name

Robert P. J. Day rpjday at mindspring.com
Sun May 8 14:36:39 UTC 2005


  since bugzilla had nothing obvious to say about "dos2unix", i
thought i'd ask here.

  i'm using "find" and "dos2unix" to (recursively) convert a pile of C
source files to proper UNIX format.  partway through the command, i
start getting errors of the form (actual directory names shortened for
brevity):

dos2unix a/b/c/file.c
dos2unix: converting file a/b/c/file.c to UNIX format ...
dos2unix: problems renaming 'a/b/c/d2utmpRRN784??' to 'a/b/c/file.c'
          output file remains in 'a/b/c/d2utmpRRN784??'

the problem seems clear -- where you see the '??' in the temp file
name are actually special characters -- using "hexdump" shows that,
while the temp files seem to have the correct name, the "dos2unix"
command is trying to use a filename with the extra octal bytes

  001 017 002

on the end.  in short, because of this extra junk, dos2unix is
obviously not finding the actual (proper) temp file and failing.  any
thoughts on where that extra trash is coming from?

  if i run the command in the directory containing the file, it works
fine.  if i do it from three directories up, failure.  curious.

rday





More information about the users mailing list