« Home | Useful Kernel manipulation commands » | Saturation of open files in the system » | Set up Auto-Logout for root user » | 20 Linux System Monitoring Tools Every SysAdmin Sh... » | How to send email from the Linux command line » | Installing rrdtool using yum on CentOS » | How to configure TCP/IP filtering in Windows 2000 » | Hardening CentOS 5 » | PacMan: THE LAST FIGHT » | How To: Transfer your PuTTY settings between compu... » 

Wednesday, July 21, 2010 

Splitting a file in GNU/Linux

If you want to split a file "example" with size 9.6 Mb( 10000000 b) into two, then the command to do the same is:


$ split -b 5000000 example

File "example" is now split into two files "xaa" and "xab" by default and these two files will be having the size 5000000 b.  Reducing file size will lead to more number of new files generated. You can also specify the output filename. Suppose you want to use output file name as "wxz", then the following command will help you:

$ split -b 5000000 example wxz

Now how to join the splitted files? You can use the cat command to join the splitted files. For example if the new files generated by split are "xaa", "xab" and "xac", use the following command to join the splitted files.

$ cat xa* > filename 
 
 http://kb.bobcares.com/

Add to Google

The Author

  • Nick Perrydoo
  • Spawn at Philippines
My profile

Links


Read Ons

Article of the Day

This Day in History

Today's Birthday

In the News

Quotation of the Day

Word of the Day


Powered by Blogger
and Blogger Templates
© Copyright 2006 Ba-zoo-ra - All Rights Reserved.