split -- split a file into pieces
Syntax
======
split [ -l line_count ] [ -a suffix_length ] [ file [ name ] ]
split [ -b n[k|m] ] [ -a suffix_length ] [ file [ name ] ]
split [ -line_count ] [ -a suffix_length ] [ file [ name ] ]
Description
===========
The split command reads file and writes it in as many n-line pieces as
necessary (default 1000), onto a set of output files. The name of the first
output file is name with aa appended, and so on lexicographically. If no
output name is given, x is default.
The following options are recognized:
-line_count
Specifies the number of lines in the resulting file.
-a suffix_length
Specifies that suffix_length letters are to be used to form the
suffix portion of the filenames of the split files.
-b n Specifies that the file is to be split into n byte pieces.
-b nk Specifies that the file is to be split into n kilobyte pieces.
-b nm Specifies that the file is to be split into n megabyte pieces.
If no input file is given, or if a dash (-) is given instead, the standard
input file is used.
Exit values
===========
split returns 0 on success, 1 on failure.
Examples
========
Split the file testfile (124 lines long) into fileaa, fileab, and fileac
(50, 50, and 24 lines long respectively):
split -l 50 testfile file
See also
========
bfs(C), csplit(C)
Standards conformance
=====================
split is conformant with:
ISO/IEC DIS 9945-2:1992, Information technology - Portable Operating System
Interface (POSIX) - Part 2: Shell and Utilities (IEEE Std 1003.2-1992);
AT&T SVID Issue 2;
X/Open CAE Specification, Commands and Utilities, Issue 4, 1992.
SCO OpenServer Release 5.0.6 -- 1 August 2000
See also split(TCL): man TCL split
scounix# cd /; du -ms *
usage: du [-afkrsuxV] [name ...]
/ and /usr2 are bigger than 2GB:
Code:
scounix# dfspace
15563 Signal 31 - core dumped
14824 Signal 31 - core dumped
/ : Disk space: 3403,25 MB of 4000,00 MB available (85,08%).
/stand : Disk space: 14,15 MB of 24,41 MB available (57,97%).
/usr2 : Disk space: 53678,50 MB of 64423,23 MB available (83,32%).
/ The root file system is 4000-3403 = 600megabytes.
/usr2 is 64423-53768 = 11gigabytes.
You can copy all of the root file system and /stand into a single file easily enough.
Use
Code:
du -a /usr2 |sort -r -n >/tmp/du.srt
To list all the files on /usr2 in descending order. Directories will also be shown. Use this (/tmp/du.srt) to decide how to split the data up. You can also use compress (or gzip) if you have it to reduce the file size.
If you install cdrecord, you could probably get all of /usr2 on a single dual layer dvd.
du.srt is only a text file containing a list of the files and directories on the /usr2 file system sorted into descending order by size (size being 512 character blocks.)
If you analyze it, you should be able to compress enough files to get the usage below the size of a single dvd.
Hi all,
I am trying to virtualize a running SCO 5.0.6 system with microfocus cobol installed.
I have already managed (thanks to the people in this forum) to install the operating system.
I dont have the cobol installation media anymore. I have copied (using cpio) all directories from... (3 Replies)
Hi,
I am new to unix. I am working on Red Hat Linux and side by side on AIX also. After reading the concepts of Storage, I am now really confused regarding the terminologies
1)Physical Volume
2)Volume Group
3)Logical Volume
4)Physical Partition
Please help me to understand these concepts. (6 Replies)
After a memory upgrade all network interfaces are misconfigued. How do i resolve this issue. Below are some out puts.thanks.
ifconfig: plumb: SIOCLIFADDIF: eg000g0:2: no such interface
# ifconfig eg1000g0:2 plumb
ifconfig: plumb: SIOCLIFADDIF: eg1000g0:2: no such interface
# ifconfig... (2 Replies)
Hello,
is it somehow possible to run a x86 Linux OS in a virtual machine in Solaris running on Sparc ? Virtualbox ? Containers ?
I know it would be easier just get a Intel hardware and run the Linux but I might be in a scenario where only Sparc hardware is allowed by corporate policy and still... (6 Replies)
Hello All,
Can anybody please tell me what is the maximum limit of Physical IBM Power Machine which can be handled by single HMC at a single point of time?
Thanks,
Jenish (1 Reply)
I was in smit, checking on disc space, etc. and it appears that one of our physical volumes that is part of a large volume group, has no free physical partitions. The server is running AIX 5.1. What would be the advisable step to take in this instance? (9 Replies)
Hello,
I need explanations about physical disks and physical volumes. What is the difference between these 2 things?
In fact, i am trying to understand what the AIX lspv2command does.
Thank you in advance. (2 Replies)