If you have the file too big, cause some portable device can't copy the problem, hey! It's right to find split! He can help you. You can divide a large file into small files by dividing it by file size or number of rows. Fast and effective! Really good ~
[Email protected] ~]#Split[-BL]fileprefix options and parameters:-B: The following can be divided into the file size, can be added units, such as B, K, m, etc.;-L: Split by number of rows. PREFIX: Represents the leader character and can be used as the leading text for the split file. Example one: my/etc/termcap have more than 700 k, if you want to be divided into 300K a file? [[Email protected]~]# cd/tmp;Split-B 300k/etc/termcap Termcap[[email protected] tmp]# ll-K termcap*-rw-r--r--1Root root -Feb7 -: theTERMCAPAA-rw-r--r--1Root root -Feb7 -: thetermcapab-rw-r--r--1Root root189Feb7 -: thetermcapac# that file name is free to take! We just write the preamble, small files will be # Xxxaa, Xxxab, Xxxac and other ways to create small files! Example two: How to synthesize the three small files above a file named Termcapback[[email protected] tmp]#Cattermcap* >>termcapback# is simple, isn't it? Just use the data flow redirection. Simple! Example three: Usingls-al/output information, every 10 lines are recorded as one file [[email protected] tmp]#ls-al/|Split-LTen-Lsroot[[email protected] tmp]#WC-L lsroot*TenLsrootaaTenLsrootab6Lsrootac -total# focus on that-Now! In general, if you need stdout/stdin, but there is no document, # some just-When, then that-will be treated as stdin or stdout ~
What do you need to do to split a file under the Windows operating system? It's a headache! It's a lot easier under Linux! If you want to split the file, then use the-B size to limit the size of a segmented file, and if it is the number of rows, then use the-L line to split it! Good use of it! In this way, you can easily partition your files into a floppy disk (floppy) size, convenient for you to copy!
Reference:http://vbird.dic.ksu.edu.tw/linux_basic/0320bash.php#split