Considering that you have 50MB of single file. Your friend needs it urgently. The situation shows that the ONLY means of transferring this large file between you and your friend is thru email exchanges. The problem is both your ISP limits the size of email attachments to 5MB file attachments.
How to transfer 50MB large file by email?
How to split and merge large chunks of file by email?
How to send big file by email?
How to split big file and rejoin them later from the other end?
Splitting and Merging Multiple Linux Files
Split linux commands chops file into multiple chunks of file. Split command divides a single file into multiple files regardless of file types. Split command is fantastic on handling and splitting binary files, compressed and archived files, text files and any other file types. Split is part of coreutils package.
Here's how to accomplish our objective of splitting large files into pieces and merging them back.
As an example, I have prepared a binary rpm file named testfile.rpm with 18MB filesize. Our objective is to split tesfile.rpm into multiple file pieces and merge them back into the same binary file state from the other end.# ls -la testfile.rpm
-rw-r--r-- 1 root root 18835725 2007-11-23 11:07 testfile.rpm
Spliting the file into multiple file chunks with 4MB as maximum filesize# split -b4000000 testfile.rpm
# ls -la
-rw-r--r-- 1 root root 18835725 2007-11-23 11:07 testfile.rpm
-rw-r--r-- 1 root root 4000000 2007-11-23 12:27 xaa
-rw-r--r-- 1 root root 4000000 2007-11-23 12:27 xab
-rw-r--r-- 1 root root 4000000 2007-11-23 12:27 xac
-rw-r--r-- 1 root root 4000000 2007-11-23 12:27 xad
-rw-r--r-- 1 root root 2835725 2007-11-23 12:27 xae
Notice that the file testfile.rpm as splitted into 5 file chunks, with 4 files having 4MB filesize and 1 file having more than 2MB of filesize. Filename conventions are written alphabetically xaa, xab, xac, xad and xae and so on for larger file.
Since each filesize is less than the 5MB email attachment limit, you can now attach these multiple chunks of file into your email message and send them successfully into the receiving end, bypassing email attachment restrictions of 5MB.
Now, we need to merge them back from the other receiving end. Here's how to do it.
How to merge splitted files into a single big file?
Simply issue these simple commands:# cat xaa xab xac xad xae > newfile.rpm
# ls -la
-rwxr-xr-x 1 root root 18835725 2007-11-23 12:35 newfile.rpm
-rwxr-xr-x 1 root root 18835725 2007-11-23 11:07 testfile.rpm
-rw-r--r-- 1 root root 4000000 2007-11-23 12:27 xaa
-rw-r--r-- 1 root root 4000000 2007-11-23 12:27 xab
-rw-r--r-- 1 root root 4000000 2007-11-23 12:27 xac
-rw-r--r-- 1 root root 4000000 2007-11-23 12:27 xad
-rw-r--r-- 1 root root 2835725 2007-11-23 12:27 xae
The receiving end now has the actual file with simple file splitting and file merging operations.
Have a nice weekend!
HTH
Subscription
Categories
- HowTos (612)
- Linux Devices (40)
- Linux Diggs (620)
- Linux News (1541)
- Linux Videos (24)
Recent Posts
Blog Archive
-
▼
2007
(340)
-
▼
November
(39)
- HowTo: Strip directory path and filename suffix
- HowTo: Get the Filename Extension Only
- Tailf - watch the linux log file grows
- Fedora 8 with Enlightenment Window Manager
- HowTo: ScreenCasts & Desktop Records via Istanbul
- HowTo: Record Desktop Session via Byzanz
- Linux Scorched 3D Tank Game
- Linux Atomic Battle Tank Game
- HowTo: Display a Tree of Linux Processes
- Howto: 3 Easy Install Steps of Microsoft Fonts in ...
- Howto: Convert PDF to HTML/XML/PNG in Linux
- Livna Repository on Fedora 8
- Linux Action Flight Simulator Game
- Splitting and Merging Multiple Linux Files
- Sort Nth Position of Nth Column of a File in Linux
- Stop, Pause, and Continue A Linux Process
- File Creation without File Opening in Linux
- Concatenate Multiple Files in Linux
- Renaming Files in Linux
- Linux Power Consumption Analysis Tool
- Tail and Head Few Lines of Text Files
- Three Easy Steps for Opera on Fedora 8
- Alternative Search and Replace Tool
- Display Lines Beginning with a Given String
- Spell Check Files via Terminal - Install Howto
- Display Linux Session Jobs
- Get Linux Disk Space and Usage
- Change Linux RunLevels Howto
- Audacious - Install Howto
- Amarok - Howto Install
- Sun Java on Fedora 8 Install HowTo
- My Fedora 8 Diary
- Chikka on Kopete Messenger Howto
- Linux Files and Folders Local Copying
- Linux folders and directories recursive removal
- MailX - Mail Facility via Terminal
- Time zone values interpretation
- Retrieving Linux Standard Base and Distro Information
- Fedora Firstboot
-
▼
November
(39)
Thursday, November 22, 2007
Splitting and Merging Multiple Linux Files
Subscribe to:
Post Comments (Atom)
ILoveTux - howtos and news | About | Contact | TOS | Policy
0 comments:
Post a Comment