How to split up the file using Linux command | how to perform the large file into separate small file without any software in Linux

In the Linux you can split up the file. Split up means if you have 1200MB file but now you like to store this file into two CD(600MB+600MB=1200MB).Is it possible. Yes it is possible.Now I will show you
Example: now I have 14.4mb file. I will split up
Into two file like 8m and remaining size
See that I have one .dat file it is size 14 mbHow to split up the file using Linux command | how to perform the large file into separate small file without any software in Linux

[kumar@localhost test]$ ls -l
total 14740
-rwxr-xr-x 1 kumar kumar 15066956 Apr 14 2006 AVSEQ14.DAT

By using split command I will split up the file (source file size 14.4mb) into 8 mb
-b option represents byte

[kumar@localhost test]$ split -b 8m AVSEQ14.DAT
After split up see that it contain two file
One is 8 mb and another one 6.4mb
[kumar@localhost test]$ ls -l
total 29488
-rwxr-xr-x 1 kumar kumar 15066956 Apr 14 2006 AVSEQ14.DAT
-rw-rw-r-- 1 kumar kumar 8388608 Apr 17 20:18 xaa
-rw-rw-r-- 1 kumar kumar 6678348 Apr 17 20:18 xab


If you can see the screen shot you got the idea.

After split up if you recover multiple file into single file means see the following command


[kumar@localhost test]$ cat xa*>newfile.dat
[kumar@localhost test]$ ls -l
total 44228
-rwxr-xr-x 1 kumar kumar 15066956 Apr 14 2006 AVSEQ14.DAT
-rw-rw-r-- 1 kumar kumar 15066956 Apr 17 20:25 newfile.dat
-rw-rw-r-- 1 kumar kumar 8388608 Apr 17 20:18 xaa
-rw-rw-r-- 1 kumar kumar 6678348 Apr 17 20:18 xab



Related post