in reply to Re: Dos to Unix conversion
in thread Dos to Unix conversion

Your question is ambiguous...dos and unix are not file-types ... they're operating systems (and unix refers to a whole class of operating systems...)

if you're referring to the naming conventions, then it should be easy to rename the files before tarring them...if you're working with binary files then conversion will need to be done specifically for each file (hopefully you have a conversion utility for whatever type of conversion you have in mind)

Unless these files are spread across multiple directories and subject to a long list of constraints, this seems to be something that would be better performed with a batch script within the source operating system.

If you're concerned with simply transporting the files from one system to another, you can probably just ftp the whole tar file from any convenient terminal program...

Please provide more information as to the nature of your problem.

-muoyo

Replies are listed 'Best First'.
Re^3: Dos to Unix conversion
by perl_99_monk (Novice) on Nov 18, 2005 at 20:21 UTC
    my files are in various directories. I read a input file called test.txt to get the files and tar them up. I then move the tar file to a unix box. Example of my input file: test/test1.txt test2/test.sql test/test2/test3.txt I am able to move the file to unix box but when I untar the files and take a look at it they have ^M and end of each line. I am doing ftp in binary mode. If I use asii I get the error block size error.
Re^3: Dos to Unix conversion
by Muoyo (Novice) on Nov 20, 2005 at 13:08 UTC
    Given your additional info I would agree with the comments later in the thread.. use dos2unix to convert text files (barring that, you could write a reg-exp to strip the ^M at every newline).
    Secondly, try a test case involving tarring only text files to see whether the block size error is intrinsic, or data dependent.

    -muoyo