Loading ...
Sorry, an error occurred while loading the content.

Want to split a file and join back

Expand Messages
  • Dayananda YS
    Hi, I want to split a big file [100 MB] into multiple files so that I can send it by mail and join the same by the other end to use it back. The file is a data
    Message 1 of 3 , Sep 5, 2007
    • 0 Attachment
      Hi,

      I want to split a big file [100 MB] into multiple files so that I can send it by mail and join the same by the other end to use it back.

      The file is a data file with the extension of *.trn
      I have done split -b 1000000 org_file.trn
      This gave me some files with names xaa to xag [say]
      then I used cat xa[a-g] > new_name.trn
      The size of old_file.trn and new_file.trn comes to same, but I am not able to open the new_file.trn in the intended application.

      The  cat doesnot seem to work for binary files..

      Can some one help me in this regard.

      Thanks and Regards,
      Dayananda

      Dayananda YS
      98452 59517


      Pinpoint customers who are looking for what you sell.
    • Dick Connell
      ... Are you sure cat xa[a-g] gets the files in alphabetical order - have you tried cat xaa new_name.trn cat xab new_name.trn .... or cat `ls x??`
      Message 2 of 3 , Sep 5, 2007
      • 0 Attachment
        On 9/5/07, Dayananda YS <dayas2003@...> wrote:
        Hi,

        I want to split a big file [100 MB] into multiple files so that I can send it by mail and join the same by the other end to use it back.

        The file is a data file with the extension of *.trn
        I have done split -b 1000000 org_file.trn
        This gave me some files with names xaa to xag [say]
        then I used cat xa[a-g] > new_name.trn _,

        Are you sure cat xa[a-g] gets the files in alphabetical order  - have you tried

        cat xaa > new_name.trn
        cat xab >> new_name.trn
        ....

        or cat `ls x??` > new_name.trn

        then use cmp to see if there is a difference.

        Otherwise try using dd within a script.

        Dick

        _._,___


      • Ben O'Hara
        Or just use join Ben ... -- A Scientist will earn a living by taking a really difficult problem and spends many years solving it, an engineer earns a living
        Message 3 of 3 , Sep 5, 2007
        • 0 Attachment
          Or just use "join"

          Ben

          On 9/5/07, Dick Connell <dick@...> wrote:



          On 9/5/07, Dayananda YS < dayas2003@...> wrote:
          Hi,

          I want to split a big file [100 MB] into multiple files so that I can send it by mail and join the same by the other end to use it back.

          The file is a data file with the extension of *.trn
          I have done split -b 1000000 org_file.trn
          This gave me some files with names xaa to xag [say]
          then I used cat xa[a-g] > new_name.trn _,

          Are you sure cat xa[a-g] gets the files in alphabetical order  - have you tried

          cat xaa > new_name.trn
          cat xab >> new_name.trn
          ....

          or cat `ls x??` > new_name.trn

          then use cmp to see if there is a difference.

          Otherwise try using dd within a script.

          Dick

          _._,___





          --
          "A Scientist will earn a living by taking a really difficult problem and spends many years solving it, an engineer earns a living by finding really difficult problems and side stepping them"
        Your message has been successfully submitted and would be delivered to recipients shortly.