'\" te .\" Copyright 1989 AT&T .\" Copyright (c) 1999, Sun Microsystems, Inc. All Rights Reserved .\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation.Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/. .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation.In the following statement, the phrase "this text" refers to portions of the system documentation.Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group.In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document.The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.This notice shall appear on any product containing this material. .TH split 1 "1999 年 4 月 16 日" "SunOS 5.11" "用户命令" .SH 名称 split \- 将文件分割成多个片段 .SH 用法概要 .LP .nf \fBsplit\fR [\fB-linecount\fR | \fB-l\fR \fIlinecount\fR] [\fB-a\fR \fIsuffixlength\fR] [\fIfile\fR [\fIname\fR]] .fi .LP .nf \fBsplit\fR [\fB-b\fR \fIn\fR | \fIn\fRk | \fIn\fRm] [\fB-a\fR \fIsuffixlength\fR] [\fIfile\fR [\fIname\fR]] .fi .SH 描述 .sp .LP \fBsplit\fR 实用程序读取 \fIfile\fR 并以 \fIlinecount\fR 行片段的形式将其写入到一组输出文件中。第一个输出文件的名称是 \fIname\fR 并附加 \fBaa\fR,然后按字段顺序依此类推,直至 \fBzz\fR(最大文件数量为 676)。\fIname\fR 的最大长度比文件系统允许的最大文件名长度少两个字符。请参见 \fBstatvfs\fR(2)。如果未指定输出名称,\fBx\fR 将用作缺省值(输出文件将命名为 \fBxaa\fR、\fBxab\fR,依此类推)。 .SH 选项 .sp .LP 支持以下选项: .sp .ne 2 .mk .na \fB\fB-\fR\fIlinecount\fR \fB|\fR \fB-l\fR \fIlinecount\fR\fR .ad .RS 29n .rt 每个片段中所包含的行数。缺省为 \fB1000\fR 行。 .RE .sp .ne 2 .mk .na \fB\fB-a\fR \fIsuffixlength\fR\fR .ad .RS 29n .rt 使用 \fIsuffixlength\fR 个字母组成分割文件的文件名的后缀部分。如果未指定 \fB-a\fR,缺省的后缀长度为 \fB2\fR。如果 \fIname\fR 操作数与 \fI suffixlength\fR 选项-参数的总和将创建长度超过 \fINAME_MAX\fR 个字节的文件名,则会导致错误;\fBsplit\fR 将退出并发出诊断消息,并且不会创建任何文件。 .RE .sp .ne 2 .mk .na \fB\fB-b\fR \fIn\fR\fR .ad .RS 29n .rt 将文件分割成大小为 \fIn\fR 个字节的片段。 .RE .sp .ne 2 .mk .na \fB\fB-b\fR \fIn\fR\fBk\fR\fR .ad .RS 29n .rt 将文件分割成大小为 \fIn\fR\fB*1024\fR 个字节的文件。 .RE .sp .ne 2 .mk .na \fB\fB-b\fR \fIn\fR\fBm\fR\fR .ad .RS 29n .rt 将文件分割成大小为 \fIn\fR\fB*1 048 576\fR 个字节的文件。 .RE .SH 操作数 .sp .LP 支持下列操作数: .sp .ne 2 .mk .na \fB\fIfile\fR\fR .ad .RS 8n .rt 待分割普通文件的路径名称。如果未指定任何输入文件,或者 \fIfile\fR 为 \fB-\fR,将使用标准输入。 .RE .sp .ne 2 .mk .na \fB\fIname\fR\fR .ad .RS 8n .rt 要用于每个由 \fBsplit\fR 操作生成的文件的前缀。如果未指定任何 \fIname\fR 参数,将使用 \fBx\fR 作为输出文件的前缀。\fIprefix\fR 和 \fIsuffixlength\fR 的基名的组合长度不能超过 \fINAME_MAX\fR 个字节。请参见“选项”部分。 .RE .SH 用法 .sp .LP 有关 \fBsplit\fR 遇到大于或等于 2 GB(2^31 字节)文件时行为的说明,请参见 \fBlargefile\fR(5)。 .SH 环境变量 .sp .LP 有关影响 \fBsplit\fR 执行的以下环境变量的说明,请参见 \fBenviron\fR(5):\fBLANG\fR、\fBLC_ALL\fR、\fBLC_CTYPE\fR、\fBLC_MESSAGES\fR 和 \fBNLSPATH\fR。 .SH 退出状态 .sp .LP 将返回以下退出值: .sp .ne 2 .mk .na \fB\fB0\fR\fR .ad .RS 6n .rt 成功完成。 .RE .sp .ne 2 .mk .na \fB\fB>0\fR\fR .ad .RS 6n .rt 出现错误。 .RE .SH 属性 .sp .LP 有关下列属性的说明,请参见 \fBattributes\fR(5): .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . 属性类型属性值 _ 可用性system/core-os _ CSIEnabled(已启用) _ 接口稳定性Committed(已确定) _ 标准请参见 \fBstandards\fR(5)。 .TE .SH 另请参见 .sp .LP \fBcsplit\fR(1)、\fBstatvfs\fR(2)、\fBattributes\fR(5)、\fBenviron\fR(5)、\fBlargefile\fR(5)、\fBstandards\fR(5)