LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 11-03-2006, 02:19 PM   #1
Quantumstate
Member
 
Registered: Jun 2005
Location: Seattle, Ecotopia
Distribution: Debian Testing with KDE
Posts: 142

Rep: Reputation: 15
Split Command... How to Rejoin?


I've just lost an hour of my life to this stupid problem.

I need to split a file into pieces (madwifi), so I can move it over on floppy to my machine with malfunctioning network. I used split, and it divided it up just fine. But for the life of me, I can not figure out how to rejoin the files at the other end.

cp and mv do not have an append function. cp infile1 outfile does fine, but when I cp infile2 >> outfile, it gives "missing destination file operand after infile2". cp infile1,infile2 outfile doesn't fscking work.

join and paste are the wrong things. dd if=infile1,infile2 of=outfile doesn't work either. Maybe I should be using dd in the first place. I am enraged.
 
Old 11-03-2006, 02:28 PM   #2
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 53
I use cat to restore it.
For example:
Code:
#ls -lh

total 62M
-rw-r--r--  1 root   root    62M Dec 25 23:55 aclinux.zip

To split aclinux.zip into files which are slightly smaller
than 9M , use the command: split -b 9000k aclinux.zip

#ls -lh

total 123M
-rw-r--r--  1 root   root    62M Dec 25 23:55 aclinux.zip
-rw-r--r--  1 root   root   8.8M Dec 26 00:01 xaa
-rw-r--r--  1 root   root   8.8M Dec 26 00:01 xab
-rw-r--r--  1 root   root   8.8M Dec 26 00:01 xac
-rw-r--r--  1 root   root   8.8M Dec 26 00:01 xad
-rw-r--r--  1 root   root   8.8M Dec 26 00:01 xae
-rw-r--r--  1 root   root   8.8M Dec 26 00:01 xaf
-rw-r--r--  1 root   root   8.6M Dec 26 00:01 xag


Restore the file with the command: cat xa* > aclinux-restored.zip

#ls -lh

total 185M
-rw-r--r--  1 root   root    62M Dec 26 00:10 aclinux-restored.zip
-rw-r--r--  1 root   root    62M Dec 26 00:06 aclinux.zip
-rw-r--r--  1 root   root   8.8M Dec 26 00:01 xaa
-rw-r--r--  1 root   root   8.8M Dec 26 00:01 xab
-rw-r--r--  1 root   root   8.8M Dec 26 00:01 xac
-rw-r--r--  1 root   root   8.8M Dec 26 00:01 xad
-rw-r--r--  1 root   root   8.8M Dec 26 00:01 xae
-rw-r--r--  1 root   root   8.8M Dec 26 00:01 xaf
-rw-r--r--  1 root   root   8.6M Dec 26 00:01 xag
 
Old 11-03-2006, 02:49 PM   #3
Quantumstate
Member
 
Registered: Jun 2005
Location: Seattle, Ecotopia
Distribution: Debian Testing with KDE
Posts: 142

Original Poster
Rep: Reputation: 15
Thank you, that worked.

(Of course! I should have known it would be cat... {smirk})
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
UNIX shell script: split long command on multiple lines loopoo Linux - Newbie 2 10-23-2006 09:34 AM
Need help with a short Linux command line script - working with split files bpmee Linux - Newbie 3 10-04-2006 02:08 AM
split command in perl not splitting / linuxmandrake Programming 1 11-03-2005 03:28 PM
command to split up directory by size? dr_zayus69 Programming 6 06-27-2005 03:12 AM
How to rejoin split files SharpyWarpy Linux - General 2 02-07-2003 02:42 PM


All times are GMT -5. The time now is 10:29 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration