Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.


#14 Using Zip file on Linux

John Fabiani

First let me say I'm sort of a newbie when it comes to
Linux. I'm using SuSE 8.2. However, I ran into the
following problem after unzipping the files. All the "py"
files had "\r" at the end of every line of code. I figured
out this was a result of saving the code in windows. I
attempted to use the "-a" parameter to unzip but that
did not work. The man page for unzip states that the "-
a" parameter only works on files marked as text (not
sure how to mark a file). I then used "-aa" to force the
issue. But this command caused corruption on the other
files (it did fix the "py" files). In the end I had to create
two unzip areas and combine them. I'm not sure how to
fix this - but it took me a very long time. Maybe
someone knows what needs to be done to correct the

John Fabiani


  • Steve Lamb
    Steve Lamb

    Logged In: YES

    Well, there are several utils for this. I'm on a Debian system so I can't help
    you with packages, just the names.

    todos, fromdos are two that convert from one format to the next.

    dos2unix and unix2dos are another two

    flip is a third which is quite nice and is the one I personally use on my
    projects when working in Boa (in Windows) while running in Linux.

    You only need to convert the first file since it is the top line to call Python
    which is confused by the \r where it shouldn't be. The rest Python handles

    Also I reported this as a bug and IIRC Riaan has come up with a solution.
    See the following: