Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

csplit

From Wikipedia, the free encyclopedia
Shell command for splitting files
csplit
Operating systemUnix andUnix-like
PlatformCross-platform
TypeCommand
LicenseGNU GPL v3

csplit is ashellcommand for splitting afile into two or more smaller files determined by context lines. The command is commonly available onUnix andUnix-likeoperating systems.

The command is part of theX/Open Portability Guide since issue 2 of 1987. It was inherited into the first version of POSIX and theSingle Unix Specification.[1] It first appeared in PWB UNIX.[2] The version inGNUcoreutils was written by Stuart Kemp and David MacKenzie.[3] The command is available forWindows viaUnxUtils.[4]

Usage

[edit]

Thecommand line arguments consist of options, a file path and a list of patterns.

Each patterns is aline number orregular expression. The program outputs pieces of the file separated by the patterns into filesxx00,xx01, etc., and outputs the size of each piece, inbytes, tostandard output.

Comparison to split

[edit]

Thesplit command also splits a file into pieces, although the pieces are of a fixed size, measured in lines or bytes.

See also

[edit]

References

[edit]
  1. ^csplit – Shell and Utilities Reference,The Single UNIX Specification, Version 5 fromThe Open Group
  2. ^csplit(1) – FreeBSD General CommandsManual
  3. ^"Csplit(1) - Linux man page".Archived from the original on 2019-07-31. Retrieved2019-01-26.
  4. ^"Native Win32 ports of some GNU utilities".unxutils.sourceforge.net.Archived from the original on 2006-02-09. Retrieved2025-08-09.

Further reading

[edit]
  • Ellen Siever, Aaron Weber, Stephen Figgins, Robert Love, Arnold Robbins, et al.Linux in a Nutshell, 5th Edition. O'Reilly Media: July 2005.ISBN 978-0-596-00930-4.

External links

[edit]
The WikibookGuide to Unix has a page on the topic of:Commands
File system
Processes
User environment
Text processing
Shell builtins
Searching
Documentation
Software development
Miscellaneous
File system
Text utilities
Shell utilities
Retrieved from "https://en.wikipedia.org/w/index.php?title=Csplit&oldid=1336332037"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp