Skip to main content

more options


File Nuances

Windows, Linux, and Unix use different conventions with certain types of files. You need to be aware of these, if you are trying to use files from a Unix system on CTC. In particular:

  • Binary files: little vs. big endian byte storage patterns
    • Little endian - Windows and Linux
    • Big endian - Unix (often)
    • You will need to write a Fortran or C program to do this machine-dependent conversion
  • Text files: end-of-line characters differ
    • CR+LF in Windows, LF in Linux and Unix (CR on an older Mac)
    • Use ftp (in ASCII mode) to convert EOL automatically during transfer
    • WordPad (Programs:Accessories menu) can do EOL conversion to Windows; use this if you find you have a file that hasn't been converted cleanly
    • dos2unix does conversion the other way, from Windows to Linux/Unix

Windows, Linux, and Unix use different conventions with certain types of files. You need to be aware of these, if you are trying to use files from a Unix system on CTC. In particular:

  • Binary files: little vs. big endian byte storage patterns. This refers to the order in which bytes are stored. The least significant bits occur in the first byte in little endian, and vice versa for big endian. So if you have a four byte word, the bit order is the same; but the byte order is reversed. This relates more to the computer architecture than the operating system. Data from big-endian machines (RS6000, PowerPC) will need to be converted to little endian.
    • Little endian - Windows and Linux
    • Big endian - Unix (often)
    • You will need to write a Fortran or C program to do this machine-dependent conversion
  • Text files: end-of-line characters differ. If you transfer a Windows file over to Linux or Unix, you often see little ^M characters everywhere; those are the carriage returns showing up. There are software tools that are aware of these end-of-line differences and can do the necessary conversions automatically.
    • CR+LF in Windows, LF in Linux and Unix (CR on an older Mac)
    • Use ftp (in ASCII mode) to convert EOL automatically during transfer
    • WordPad (Programs:Accessories menu) can do EOL conversion to Windows; use this if you find you have a file that hasn't been converted cleanly
    • dos2unix does conversion the other way, from Windows to Linux/Unix