
430
|
Chapter 3: Linux Commands
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
-z, --zero-terminated
End lines with zero byte, not with newline.
--version
Print version information and then exit.
-M, --month-sort
Attempt to treat the first three characters as a month designa-
tion (JAN, FEB, etc.). In comparisons, treat JAN < FEB and
any invalid name for a month as less than a valid month.
-Ssize, --buffer-size=size
Set the size of the main memory buffer to size, which may
include a suffix—e.g., K (1024, the default) or M.
-T tempdir, --temporary-directory=dir
Directory pathname to be used for temporary files.
Examples
List files by decreasing number of lines:
wc -l * | sort -r
Alphabetize a list of words, remove duplicates, and print the
frequency of each word:
sort -fd wordlist | uniq -c
Sort the password file numerically by the third field (user ID):
sort -nk3,4 -t: /etc/passwd
split
split [options] [infile [prefix]]
Split infile into equal-sized segments. infile remains unchanged, and
the results are written to prefixaa, prefixab, and so on. The default
prefix is x, giving the output files xaa, xab, etc. If infile is - or
missing, standard input is read. See also csplit.
Options
-a n, --suffix-length=n
Use suffixes of length n (default is 2).
-b n[b|k|m], --bytes=n[b|k|m]
Split infile into n-byte segments. Alternate block sizes may be
specified: ...