~ubuntu-branches/ubuntu/utopic/coreutils/utopic-proposed

« back to all changes in this revision

Viewing changes to doc/coreutils.texi

  • Committer: Colin Watson
  • Date: 2013-10-30 15:48:33 UTC
  • mfrom: (8.3.5 sid)
  • Revision ID: cjwatson@canonical.com-20131030154833-xdt6e1yfffqom1c4
merge from Debian 8.21-1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
\input texinfo
2
2
@c %**start of header
3
3
@setfilename coreutils.info
4
 
@settitle @sc{gnu} Coreutils
 
4
@settitle GNU Coreutils
5
5
 
6
6
@c %**end of header
7
7
 
85
85
* nl: (coreutils)nl invocation.                 Number lines and write files.
86
86
* nohup: (coreutils)nohup invocation.           Immunize to hangups.
87
87
* nproc: (coreutils)nproc invocation.           Print the number of processors.
 
88
* numfmt: (coreutils)numfmt invocation.         Reformat numbers.
88
89
* od: (coreutils)od invocation.                 Dump files in octal, etc.
89
90
* paste: (coreutils)paste invocation.           Merge lines of files.
90
91
* pathchk: (coreutils)pathchk invocation.       Check file name portability.
136
137
@end direntry
137
138
 
138
139
@copying
139
 
This manual documents version @value{VERSION} of the @sc{gnu} core
 
140
This manual documents version @value{VERSION} of the GNU core
140
141
utilities, including the standard programs for text and file manipulation.
141
142
 
142
 
Copyright @copyright{} 1994-2012 Free Software Foundation, Inc.
 
143
Copyright @copyright{} 1994-2013 Free Software Foundation, Inc.
143
144
 
144
145
@quotation
145
146
Permission is granted to copy, distribute and/or modify this document
152
153
@end copying
153
154
 
154
155
@titlepage
155
 
@title @sc{gnu} @code{Coreutils}
 
156
@title GNU @code{Coreutils}
156
157
@subtitle Core GNU utilities
157
158
@subtitle for version @value{VERSION}, @value{UPDATED}
158
159
@author David MacKenzie et al.
238
239
Formatting file contents
239
240
 
240
241
* fmt invocation::               Reformat paragraph text
 
242
* numfmt invocation::            Reformat numbers
241
243
* pr invocation::                Paginate or columnate files for printing
242
244
* fold invocation::              Wrap input lines to fit in specified width
243
245
 
 
246
@command{numfmt}: General Options, Units
 
247
 
244
248
Output of parts of files
245
249
 
246
250
* head invocation::              Output the first part of files
469
473
* General date syntax::          Common rules
470
474
* Calendar date items::          19 Dec 1994
471
475
* Time of day items::            9:20pm
472
 
* Time zone items::              @sc{est}, @sc{pdt}, @sc{gmt}
 
476
* Time zone items::              EST, PDT, UTC, @dots{}
 
477
* Combined date and time of day items:: 1972-09-24T20:02:00,000000-0500
473
478
* Day of week items::            Monday and others
474
479
* Relative items in date strings:: next tuesday, 2 years ago
475
480
* Pure numbers in date strings:: 19931219, 1440
476
481
* Seconds since the Epoch::      @@1078100502
477
482
* Specifying time zone rules::   TZ="America/New_York", TZ="UTC0"
478
 
* Authors of parse_datetime::    Bellovin, Eggert, Salz, Berets, et al
 
483
* Authors of parse_datetime::    Bellovin, Eggert, Salz, Berets, et al.
479
484
 
480
485
Opening the software toolbox
481
486
 
500
505
 
501
506
This manual is a work in progress: many sections make no attempt to explain
502
507
basic concepts in a way suitable for novices.  Thus, if you are interested,
503
 
please get involved in improving this manual.  The entire @sc{gnu} community
 
508
please get involved in improving this manual.  The entire GNU community
504
509
will benefit.
505
510
 
506
511
@cindex POSIX
507
 
The @sc{gnu} utilities documented here are mostly compatible with the
 
512
The GNU utilities documented here are mostly compatible with the
508
513
POSIX standard.
509
514
@cindex bugs, reporting
510
515
Please report bugs to @email{bug-coreutils@@gnu.org}.  Remember
583
588
@opindex -0
584
589
@itemx --null
585
590
@opindex --null
586
 
@cindex output @sc{nul}-byte-terminated lines
587
 
Output a zero byte (ASCII @sc{nul}) at the end of each line,
 
591
@cindex output NUL-byte-terminated lines
 
592
Output a zero byte (ASCII NUL) at the end of each line,
588
593
rather than a newline.  This option enables other programs to parse the
589
594
output of @command{\cmd\} even when that output would contain data
590
595
with embedded newlines.
667
672
 
668
673
Certain options are available in all of these programs.  Rather than
669
674
writing identical descriptions for each of the programs, they are
670
 
described here.  (In fact, every @sc{gnu} program accepts (or should accept)
 
675
described here.  (In fact, every GNU program accepts (or should accept)
671
676
these options.)
672
677
 
673
678
@vindex POSIXLY_CORRECT
763
768
meanings with the values @samp{0} and @samp{1}.
764
769
Here are some of the exceptions:
765
770
@command{chroot}, @command{env}, @command{expr}, @command{nice},
766
 
@command{nohup}, @command{printenv}, @command{sort}, @command{stdbuf},
767
 
@command{test}, @command{timeout}, @command{tty}.
 
771
@command{nohup}, @command{numfmt}, @command{printenv}, @command{sort},
 
772
@command{stdbuf}, @command{test}, @command{timeout}, @command{tty}.
768
773
 
769
774
 
770
775
@node Backup options
772
777
 
773
778
@cindex backup options
774
779
 
775
 
Some @sc{gnu} programs (at least @command{cp}, @command{install},
 
780
Some GNU programs (at least @command{cp}, @command{install},
776
781
@command{ln}, and @command{mv}) optionally make backups of files
777
782
before writing new versions.
778
783
These options control the details of these backups.  The options are also
846
851
 
847
852
@cindex block size
848
853
 
849
 
Some @sc{gnu} programs (at least @command{df}, @command{du}, and
 
854
Some GNU programs (at least @command{df}, @command{du}, and
850
855
@command{ls}) display sizes in ``blocks''.  You can adjust the block size
851
856
and method of display to make sizes easier to read.  The block size
852
857
used for display is independent of any file system block size.
1270
1275
@end smallexample
1271
1276
 
1272
1277
However, this doesn't move files whose names begin with @samp{.}.
1273
 
If you use the @sc{gnu} @command{find} program, you can move those
 
1278
If you use the GNU @command{find} program, you can move those
1274
1279
files too, with this command:
1275
1280
 
1276
1281
@example
1282
1287
current directory, or if any file has a name containing a blank or
1283
1288
some other special characters.
1284
1289
The following example removes those limitations and requires both
1285
 
@sc{gnu} @command{find} and @sc{gnu} @command{xargs}:
 
1290
GNU @command{find} and GNU @command{xargs}:
1286
1291
 
1287
1292
@example
1288
1293
find . -mindepth 1 -maxdepth 1 -print0 \
1302
1307
 
1303
1308
@cindex trailing slashes
1304
1309
 
1305
 
Some @sc{gnu} programs (at least @command{cp} and @command{mv}) allow you to
 
1310
Some GNU programs (at least @command{cp} and @command{mv}) allow you to
1306
1311
remove any trailing slashes from each @var{source} argument before
1307
1312
operating on it.  The @w{@kbd{--strip-trailing-slashes}} option enables
1308
1313
this behavior.
1380
1385
@samp{rm -rf / tmp/junk}, that may remove
1381
1386
all files on the entire system.  Since there are so few
1382
1387
legitimate uses for such a command,
1383
 
@sc{gnu} @command{rm} normally declines to operate on any directory
 
1388
GNU @command{rm} normally declines to operate on any directory
1384
1389
that resolves to @file{/}.  If you really want to try to remove all
1385
1390
the files on your system, you can use the @option{--no-preserve-root}
1386
1391
option, but the default behavior, specified by the
1387
 
@option{--preserve-option}, is safer for most purposes.
 
1392
@option{--preserve-root} option, is safer for most purposes.
1388
1393
 
1389
1394
The commands @command{chgrp}, @command{chmod} and @command{chown}
1390
1395
can also operate destructively on entire hierarchies, so they too
1434
1439
@section Standards conformance
1435
1440
 
1436
1441
@vindex POSIXLY_CORRECT
1437
 
In a few cases, the @sc{gnu} utilities' default behavior is
 
1442
In a few cases, the GNU utilities' default behavior is
1438
1443
incompatible with the POSIX standard.  To suppress these
1439
1444
incompatibilities, define the @env{POSIXLY_CORRECT} environment
1440
1445
variable.  Unless you are checking for POSIX conformance, you
1449
1454
sort.
1450
1455
 
1451
1456
@vindex _POSIX2_VERSION
1452
 
The @sc{gnu} utilities normally conform to the version of POSIX
 
1457
The GNU utilities normally conform to the version of POSIX
1453
1458
that is standard for your system.  To cause them to conform to a
1454
1459
different version of POSIX, define the @env{_POSIX2_VERSION}
1455
1460
environment variable to a value of the form @var{yyyymm} specifying
1612
1617
@itemx --regex
1613
1618
@opindex -r
1614
1619
@opindex --regex
1615
 
Treat the separator string as a regular expression.  Users of @command{tac}
1616
 
on MS-DOS/MS-Windows should note that, since @command{tac} reads files in
1617
 
binary mode, each line of a text file might end with a CR/LF pair
1618
 
instead of the Unix-style LF.
 
1620
Treat the separator string as a regular expression.
1619
1621
 
1620
1622
@item -s @var{separator}
1621
1623
@itemx --separator=@var{separator}
1625
1627
 
1626
1628
@end table
1627
1629
 
 
1630
On systems like MS-DOS that distinguish between text and binary files,
 
1631
@command{tac} reads and writes in binary mode.
 
1632
 
1628
1633
@exitstatus
1629
1634
 
 
1635
Example:
 
1636
 
 
1637
@example
 
1638
# Reverse a file character by character.
 
1639
tac -r -s 'x\|[^x]'
 
1640
@end example
 
1641
 
1630
1642
 
1631
1643
@node nl invocation
1632
1644
@section @command{nl}: Number lines and write files
1880
1892
@cindex string constants, outputting
1881
1893
Instead of the normal output, output only @dfn{string constants}: at
1882
1894
least @var{bytes} consecutive ASCII graphic characters,
1883
 
followed by a zero byte (ASCII @sc{nul}).
 
1895
followed by a zero byte (ASCII NUL).
1884
1896
Prefixes and suffixes on @var{bytes} are interpreted as for the
1885
1897
@option{-j} option.
1886
1898
 
1887
 
If @var{n} is omitted with @option{--strings}, the default is 3.
 
1899
If @var{bytes} is omitted with @option{--strings}, the default is 3.
1888
1900
 
1889
1901
@item -t @var{type}
1890
1902
@itemx --format=@var{type}
1978
1990
@end table
1979
1991
 
1980
1992
The next several options are shorthands for format specifications.
1981
 
@sc{gnu} @command{od} accepts any combination of shorthands and format
 
1993
GNU @command{od} accepts any combination of shorthands and format
1982
1994
specification options.  These options accumulate.
1983
1995
 
1984
1996
@table @samp
2114
2126
 
2115
2127
@menu
2116
2128
* fmt invocation::              Reformat paragraph text.
 
2129
* numfmt invocation::           Reformat numbers.
2117
2130
* pr invocation::               Paginate or columnate files for printing.
2118
2131
* fold invocation::             Wrap input lines to fit in specified width.
2119
2132
@end menu
2223
2236
 
2224
2237
@exitstatus
2225
2238
 
 
2239
@node numfmt invocation
 
2240
@section @command{numfmt}: Reformat numbers
 
2241
 
 
2242
@pindex numfmt
 
2243
 
 
2244
@command{numfmt} reads numbers in various representations and reformats them
 
2245
as requested.  The most common usage is converting numbers to/from @emph{human}
 
2246
representation (e.g. @samp{4G} @expansion{} @samp{4,000,000,000}).
 
2247
 
 
2248
@example
 
2249
numfmt [@var{option}]@dots{} [@var{number}]
 
2250
@end example
 
2251
 
 
2252
@command{numfmt} converts each @var{number} on the command-line according to the
 
2253
specified options (see below).  If no @var{number}s are given, it reads numbers
 
2254
from standard input.  @command{numfmt} can optionally extract numbers from
 
2255
specific columns, maintaining proper line padding and alignment.
 
2256
 
 
2257
@exitstatus
 
2258
 
 
2259
See @option{--invalid} for additional information regarding exit status.
 
2260
 
 
2261
@subsection General options
 
2262
 
 
2263
The program accepts the following options.  Also see @ref{Common options}.
 
2264
 
 
2265
@table @samp
 
2266
 
 
2267
@item --debug
 
2268
@opindex --debug
 
2269
Print (to standard error) warning messages about possible erroneous usage.
 
2270
 
 
2271
@item -d @var{d}
 
2272
@itemx --delimiter=@var{d}
 
2273
@opindex -d
 
2274
@opindex --delimiter
 
2275
Use the character @var{d} as input field separator (default: whitespace).
 
2276
@emph{Note}: Using non-default delimiter turns off automatic padding.
 
2277
 
 
2278
@item --field=@var{n}
 
2279
@opindex --field
 
2280
Convert the number in input field @var{n} (default: 1).
 
2281
 
 
2282
@item --format=@var{format}
 
2283
@opindex --format
 
2284
Use printf-style floating FORMAT string.  The @var{format} string must contain
 
2285
one @samp{%f} directive, optionally with @samp{'}, @samp{-}, or width
 
2286
modifiers.  The @samp{'} modifier will enable @option{--grouping}, the @samp{-}
 
2287
modifier will enable left-aligned @option{--padding} and the width modifier will
 
2288
enable right-aligned @option{--padding}.
 
2289
 
 
2290
@item --from=@var{unit}
 
2291
@opindex --from
 
2292
Auto-scales input numbers according to @var{unit}.  See UNITS below.
 
2293
The default is no scaling, meaning suffixes (e.g. @samp{M}, @samp{G}) will
 
2294
trigger an error.
 
2295
 
 
2296
@item --from-unit=@var{n}
 
2297
@opindex --from-unit
 
2298
Specify the input unit size (instead of the default 1).  Use this option when
 
2299
the input numbers represent other units (e.g. if the input number @samp{10}
 
2300
represents 10 units of 512 bytes, use @samp{--from=unit=512}).
 
2301
 
 
2302
@item --grouping
 
2303
@opindex --grouping
 
2304
Group digits in output numbers according to the current locale's grouping rules
 
2305
(e.g @emph{Thousands Separator} character, commonly @samp{.} (dot) or @samp{,}
 
2306
comma).  This option has no effect in @samp{POSIX/C} locale.
 
2307
 
 
2308
@item --header[=@var{n}]
 
2309
@opindex --header
 
2310
@opindex --header=N
 
2311
Print the first @var{n} (default: 1) lines without any conversion.
 
2312
 
 
2313
@item --invalid=@var{mode}
 
2314
@opindex --invalid
 
2315
The default action on input errors is to exit immediately with status code 2.
 
2316
@option{--invalid=@samp{abort}} explicitly specifies this default mode.
 
2317
With a @var{mode} of @samp{fail}, print a warning for @emph{each} conversion
 
2318
error, and exit with status 2.  With a @var{mode} of @samp{warn}, exit with
 
2319
status 0, even in the presence of conversion errors, and with a @var{mode} of
 
2320
@samp{ignore} do not even print diagnostics.
 
2321
 
 
2322
@item --padding=@var{n}
 
2323
@opindex --padding
 
2324
Pad the output numbers to @var{n} characters, by adding spaces.  If @var{n} is
 
2325
a positive number, numbers will be right-aligned.  If @var{n} is a negative
 
2326
number, numbers will be left-aligned.  By default, numbers are automatically
 
2327
aligned based on the input line's width (only with the default delimiter).
 
2328
 
 
2329
@item --round=@var{method}
 
2330
@opindex --round
 
2331
@opindex --round=up
 
2332
@opindex --round=down
 
2333
@opindex --round=from-zero
 
2334
@opindex --round=towards-zero
 
2335
@opindex --round=nearest
 
2336
When converting number representations, round the number according to
 
2337
@var{method}, which can be @samp{up}, @samp{down},
 
2338
@samp{from-zero} (the default), @samp{towards-zero}, @samp{nearest}.
 
2339
 
 
2340
@item --suffix=@var{suffix}
 
2341
@opindex --suffix
 
2342
Add @samp{SUFFIX} to the output numbers, and accept optional @samp{SUFFIX} in
 
2343
input numbers.
 
2344
 
 
2345
@item --to=@var{unit}
 
2346
@opindex --to
 
2347
Auto-scales output numbers according to @var{unit}.  See @emph{Units} below.
 
2348
The default is no scaling, meaning all the digits of the number are printed.
 
2349
 
 
2350
@item --to-unit=@var{n}
 
2351
@opindex --to-unit
 
2352
Specify the output unit size (instead of the default 1).  Use this option when
 
2353
the output numbers represent other units (e.g. to represent @samp{4,000,000}
 
2354
bytes in blocks of 1KB, use @samp{--to=si --to=units=1000}).
 
2355
 
 
2356
@end table
 
2357
 
 
2358
@subsection Possible @var{unit}s:
 
2359
 
 
2360
The following are the possible @var{unit} options with @option{--from=UNITS} and
 
2361
@option{--to=UNITS}:
 
2362
 
 
2363
@table @var
 
2364
 
 
2365
@item none
 
2366
No scaling is performed.  For input numbers, no suffixes are accepted, and any
 
2367
trailing characters following the number will trigger an error.  For output
 
2368
numbers, all digits of the numbers will be printed.
 
2369
 
 
2370
@item si
 
2371
Auto-scale numbers according to the @emph{International System of Units (SI)}
 
2372
standard.
 
2373
For input numbers, accept one of the following suffixes.
 
2374
For output numbers, values larger than 1000 will be rounded, and printed with
 
2375
one of the following suffixes:
 
2376
 
 
2377
@example
 
2378
@samp{K}  =>  @math{1000^1 = 10^3} (Kilo)
 
2379
@samp{M}  =>  @math{1000^2 = 10^6} (Mega)
 
2380
@samp{G}  =>  @math{1000^3 = 10^9} (Giga)
 
2381
@samp{T}  =>  @math{1000^4 = 10^{12}} (Tera)
 
2382
@samp{P}  =>  @math{1000^5 = 10^{15}} (Peta)
 
2383
@samp{E}  =>  @math{1000^6 = 10^{18}} (Exa)
 
2384
@samp{Z}  =>  @math{1000^7 = 10^{21}} (Zetta)
 
2385
@samp{Y}  =>  @math{1000^8 = 10^{24}} (Yotta)
 
2386
@end example
 
2387
 
 
2388
@item iec
 
2389
Auto-scale numbers according to the @emph{International Electronical
 
2390
Commission (IEC)} standard.
 
2391
For input numbers, accept one of the following suffixes.
 
2392
For output numbers, values larger than 1024 will be rounded, and printed with
 
2393
one of the following suffixes:
 
2394
 
 
2395
@example
 
2396
@samp{K}  =>  @math{1024^1 = 2^{10}} (Kibi)
 
2397
@samp{M}  =>  @math{1024^2 = 2^{20}} (Mebi)
 
2398
@samp{G}  =>  @math{1024^3 = 2^{30}} (Gibi)
 
2399
@samp{T}  =>  @math{1024^4 = 2^{40}} (Tebi)
 
2400
@samp{P}  =>  @math{1024^5 = 2^{50}} (Pebi)
 
2401
@samp{E}  =>  @math{1024^6 = 2^{60}} (Exbi)
 
2402
@samp{Z}  =>  @math{1024^7 = 2^{70}} (Zebi)
 
2403
@samp{Y}  =>  @math{1024^8 = 2^{80}} (Yobi)
 
2404
@end example
 
2405
 
 
2406
The @option{iec} option uses a single letter suffix (e.g. @samp{G}), which is
 
2407
not fully standard, as the @emph{iec} standard recommends a two-letter symbol
 
2408
(e.g @samp{Gi}) - but in practice, this method common.  Compare with
 
2409
the @option{iec-i} option.
 
2410
 
 
2411
@item iec-i
 
2412
Auto-scale numbers according to the @emph{International Electronical
 
2413
Commission (IEC)} standard.
 
2414
For input numbers, accept one of the following suffixes.
 
2415
For output numbers, values larger than 1024 will be rounded, and printed with
 
2416
one of the following suffixes:
 
2417
 
 
2418
@example
 
2419
@samp{Ki}  =>  @math{1024^1 = 2^{10}} (Kibi)
 
2420
@samp{Mi}  =>  @math{1024^2 = 2^{20}} (Mebi)
 
2421
@samp{Gi}  =>  @math{1024^3 = 2^{30}} (Gibi)
 
2422
@samp{Ti}  =>  @math{1024^4 = 2^{40}} (Tebi)
 
2423
@samp{Pi}  =>  @math{1024^5 = 2^{50}} (Pebi)
 
2424
@samp{Ei}  =>  @math{1024^6 = 2^{60}} (Exbi)
 
2425
@samp{Zi}  =>  @math{1024^7 = 2^{70}} (Zebi)
 
2426
@samp{Yi}  =>  @math{1024^8 = 2^{80}} (Yobi)
 
2427
@end example
 
2428
 
 
2429
The @option{iec-i} option uses a two-letter suffix symbol (e.g. @samp{Gi}),
 
2430
as the @emph{iec} standard recommends, but this is not always common in
 
2431
practice.  Compare with the @option{iec} option.
 
2432
 
 
2433
@item auto
 
2434
@samp{auto} can only be used with @option{--from}.  With this method, numbers
 
2435
with @samp{K},@samp{M},@samp{G},@samp{T},@samp{P},@samp{E},@samp{Z},@samp{Y}
 
2436
suffixes are interpreted as @emph{SI} values, and numbers with @samp{Ki},
 
2437
@samp{Mi},@samp{Gi},@samp{Ti},@samp{Pi},@samp{Ei},@samp{Zi},@samp{Yi} suffixes
 
2438
are interpreted as @emph{IEC} values.
 
2439
 
 
2440
@end table
 
2441
 
 
2442
@subsection Examples of using @command{numfmt}
 
2443
 
 
2444
Converting a single number from/to @emph{human} representation:
 
2445
@example
 
2446
$ nunfmt --to=si 500000
 
2447
500K
 
2448
 
 
2449
$ numfmt --to=iec 500000
 
2450
489K
 
2451
 
 
2452
$ numfmt --to=iec-i 500000
 
2453
489Ki
 
2454
 
 
2455
$ numfmt --from=si 1M
 
2456
1000000
 
2457
 
 
2458
$ numfmt --from=iec 1M
 
2459
1048576
 
2460
 
 
2461
# with '--from=auto', M=Mega, Mi=Mebi
 
2462
$ numfmt --from=auto 1M
 
2463
1000000
 
2464
$ numfmt --from=auto 1Mi
 
2465
1048576
 
2466
@end example
 
2467
 
 
2468
Converting from @samp{SI} to @samp{IEC} scales (e.g. when a harddisk capacity is
 
2469
advertised as @samp{1TB}, while checking the drive's capacity gives lower
 
2470
values):
 
2471
 
 
2472
@example
 
2473
$ numfmt --from=si --to=iec 1T
 
2474
932G
 
2475
@end example
 
2476
 
 
2477
 
 
2478
Converting a single field from an input file / piped input (these contrived
 
2479
examples are for demonstration purposes only, as both @command{ls} and
 
2480
@command{df} support the @option{--human-readable} option to
 
2481
output sizes in human-readable format):
 
2482
 
 
2483
@example
 
2484
# Third field (file size) will be shown in SI representation
 
2485
$ ls -log | numfmt --field 3 --header --to=si | head -n4
 
2486
-rw-r--r--  1     94K Aug 23  2011 ABOUT-NLS
 
2487
-rw-r--r--  1    3.7K Jan  7 16:15 AUTHORS
 
2488
-rw-r--r--  1     36K Jun  1  2011 COPYING
 
2489
-rw-r--r--  1       0 Jan  7 15:15 ChangeLog
 
2490
 
 
2491
# Second field (size) will be shown in IEC representation
 
2492
$ df --block-size=1 | numfmt --field 2 --header --to=iec | head -n4
 
2493
File system   1B-blocks        Used  Available Use% Mounted on
 
2494
rootfs             132G   104741408   26554036  80% /
 
2495
tmpfs              794M        7580     804960   1% /run/shm
 
2496
/dev/sdb1          694G   651424756   46074696  94% /home
 
2497
@end example
 
2498
 
 
2499
 
 
2500
Output can be tweaked using @option{--padding} or @option{--format}:
 
2501
 
 
2502
@example
 
2503
# Pad to 10 characters, right-aligned
 
2504
$ du -s * | numfmt --to=si --padding=10
 
2505
      2.5K config.log
 
2506
       108 config.status
 
2507
      1.7K configure
 
2508
        20 configure.ac
 
2509
 
 
2510
# Pad to 10 characters, left-aligned
 
2511
$ du -s * | numfmt --to=si --padding=-10
 
2512
2.5K       config.log
 
2513
108        config.status
 
2514
1.7K       configure
 
2515
20         configure.ac
 
2516
 
 
2517
# Pad to 10 characters, left-aligned, using 'format'
 
2518
$ du -s * | numfmt --to=si --format="%10f"
 
2519
      2.5K config.log
 
2520
       108 config.status
 
2521
      1.7K configure
 
2522
        20 configure.ac
 
2523
 
 
2524
# Pad to 10 characters, left-aligned, using 'format'
 
2525
$ du -s * | numfmt --to=si --padding="%-10f"
 
2526
2.5K       config.log
 
2527
108        config.status
 
2528
1.7K       configure
 
2529
20         configure.ac
 
2530
@end example
 
2531
 
 
2532
With locales that support grouping digits, using @option{--grouping} or
 
2533
@option{--format} enables grouping.  In @samp{POSIX} locale, grouping is
 
2534
silently ignored:
 
2535
 
 
2536
@example
 
2537
$ LC_ALL=C numfmt --from=iec --grouping 2G
 
2538
2147483648
 
2539
 
 
2540
$ LC_ALL=en_US.utf8 numfmt --from=iec --grouping 2G
 
2541
2,147,483,648
 
2542
 
 
2543
$ LC_ALL=ta_IN numfmt --from=iec --grouping 2G
 
2544
2,14,74,83,648
 
2545
 
 
2546
$ LC_ALL=C ./src/numfmt --from=iec --format="==%'15f==" 2G
 
2547
==     2147483648==
 
2548
 
 
2549
$ LC_ALL=en_US.utf8 ./src/numfmt --from=iec --format="==%'15f==" 2G
 
2550
==  2,147,483,648==
 
2551
 
 
2552
$ LC_ALL=en_US.utf8 ./src/numfmt --from=iec --format="==%'-15f==" 2G
 
2553
==2,147,483,648  ==
 
2554
 
 
2555
$ LC_ALL=ta_IN ./src/numfmt --from=iec --format="==%'15f==" 2G
 
2556
== 2,14,74,83,648==
 
2557
@end example
2226
2558
 
2227
2559
@node pr invocation
2228
2560
@section @command{pr}: Paginate or columnate files for printing
2267
2599
column output no line truncation occurs by default.  Use @option{-W} option to
2268
2600
truncate lines in that case.
2269
2601
 
2270
 
The following changes were made in version 1.22i and apply to later
2271
 
versions of @command{pr}:
2272
 
@c FIXME: this whole section here sounds very awkward to me. I
2273
 
@c made a few small changes, but really it all needs to be redone. - Brian
2274
 
@c OK, I fixed another sentence or two, but some of it I just don't understand.
2275
 
@ - Brian
2276
 
@itemize @bullet
2277
 
 
2278
 
@item
2279
 
Some small @var{letter options} (@option{-s}, @option{-w}) have been
2280
 
redefined for better POSIX compliance.  The output of some further
2281
 
cases has been adapted to other Unix systems.  These changes are not
2282
 
compatible with earlier versions of the program.
2283
 
 
2284
 
@item
2285
 
Some @var{new capital letter} options (@option{-J}, @option{-S}, @option{-W})
2286
 
have been introduced to turn off unexpected interferences of small letter
2287
 
options.  The @option{-N} option and the second argument @var{last_page}
2288
 
of @samp{+FIRST_PAGE} offer more flexibility.  The detailed handling of
2289
 
form feeds set in the input files requires the @option{-T} option.
2290
 
 
2291
 
@item
2292
 
Capital letter options override small letter ones.
2293
 
 
2294
 
@item
2295
 
Some of the option-arguments (compare @option{-s}, @option{-e},
2296
 
@option{-i}, @option{-n}) cannot be specified as separate arguments from the
2297
 
preceding option letter (already stated in the POSIX specification).
2298
 
@end itemize
2299
 
 
2300
2602
The program accepts the following options.  Also see @ref{Common options}.
2301
2603
 
2302
2604
@table @samp
2766
3068
before the output for each @var{file}.
2767
3069
 
2768
3070
@cindex BSD @command{tail}
2769
 
@sc{gnu} @command{tail} can output any amount of data (some other versions of
 
3071
GNU @command{tail} can output any amount of data (some other versions of
2770
3072
@command{tail} cannot).  It also has no @option{-r} option (print in
2771
3073
reverse), since reversing a file is really a different job from printing
2772
3074
the end of a file; BSD @command{tail} (which is the one with @option{-r}) can
2773
3075
only reverse files that are at most as large as its buffer, which is
2774
3076
typically 32 KiB@.  A more reliable and versatile way to reverse files is
2775
 
the @sc{gnu} @command{tac} command.
 
3077
the GNU @command{tac} command.
2776
3078
 
2777
3079
The program accepts the following options.  Also see @ref{Common options}.
2778
3080
 
3127
3429
@itemx --unbuffered
3128
3430
@opindex -u
3129
3431
@opindex --unbuffered
3130
 
Immediately copy input to output in @option{--number r/...} mode,
 
3432
Immediately copy input to output in @option{--number r/@dots{}} mode,
3131
3433
which is a much slower mode of operation.
3132
3434
 
3133
3435
@item --verbose
3490
3792
@c @cindex including files from @command{\cmd\}
3491
3793
Disallow processing files named on the command line, and instead process
3492
3794
those named in file @var{file}; each name being terminated by a zero byte
3493
 
(ASCII @sc{nul}).
 
3795
(ASCII NUL).
3494
3796
This is useful \withTotalOption\
3495
3797
when the list of file names is so long that it may exceed a command line
3496
3798
length limitation.
3497
3799
In such cases, running @command{\cmd\} via @command{xargs} is undesirable
3498
3800
because it splits the list into pieces and makes @command{\cmd\} print
3499
3801
\subListOutput\ for each sublist rather than for the entire list.
3500
 
One way to produce a list of ASCII @sc{nul} terminated file
3501
 
names is with @sc{gnu}
 
3802
One way to produce a list of ASCII NUL terminated file
 
3803
names is with GNU
3502
3804
@command{find}, using its @option{-print0} predicate.
3503
 
If @var{file} is @samp{-} then the ASCII @sc{nul} terminated
 
3805
If @var{file} is @samp{-} then the ASCII NUL terminated
3504
3806
file names are read from standard input.
3505
3807
@end macro
3506
3808
@filesZeroFromOption{wc,,a total}
3538
3840
@option{--sysv} option, corresponding file names are printed when there is
3539
3841
at least one file argument.)
3540
3842
 
3541
 
By default, @sc{gnu} @command{sum} computes checksums using an algorithm
 
3843
By default, GNU @command{sum} computes checksums using an algorithm
3542
3844
compatible with BSD @command{sum} and prints file sizes in units of
3543
3845
1024-byte blocks.
3544
3846
 
3910
4212
you get undefined behavior if @env{LC_CTYPE} is @code{ja_JP.PCK} but
3911
4213
@env{LC_COLLATE} is @code{en_US.UTF-8}.}
3912
4214
 
3913
 
@sc{gnu} @command{sort} (as specified for all @sc{gnu} utilities) has no
 
4215
GNU @command{sort} (as specified for all GNU utilities) has no
3914
4216
limit on input line length or restrictions on bytes allowed within lines.
3915
 
In addition, if the final byte of an input file is not a newline, @sc{gnu}
 
4217
In addition, if the final byte of an input file is not a newline, GNU
3916
4218
@command{sort} silently supplies one.  A line's trailing newline is not
3917
4219
part of the line for comparison purposes.
3918
4220
 
4276
4578
as @option{-k 2}, or fields consisting of a range, as @option{-k 2,3},
4277
4579
retain the field separators present between the endpoints of the range.
4278
4580
 
4279
 
To specify ASCII @sc{nul} as the field separator,
 
4581
To specify ASCII NUL as the field separator,
4280
4582
use the two-character string @samp{\0}, e.g., @samp{sort -t '\0'}.
4281
4583
 
4282
4584
@item -T @var{tempdir}
4325
4627
@opindex -z
4326
4628
@opindex --zero-terminated
4327
4629
@cindex process zero-terminated items
4328
 
Delimit items with a zero byte rather than a newline (ASCII @sc{lf}).
4329
 
I.e., treat input as items separated by ASCII @sc{nul}
4330
 
and terminate output items with ASCII @sc{nul}.
 
4630
Delimit items with a zero byte rather than a newline (ASCII LF).
 
4631
I.e., treat input as items separated by ASCII NUL
 
4632
and terminate output items with ASCII NUL.
4331
4633
This option can be useful in conjunction with @samp{perl -0} or
4332
4634
@samp{find -print0} and @samp{xargs -0} which do the same in order to
4333
4635
reliably handle arbitrary file names (even those containing blanks
4340
4642
Historical (BSD and System V) implementations of @command{sort} have
4341
4643
differed in their interpretation of some options, particularly
4342
4644
@option{-b}, @option{-f}, and @option{-n}.
4343
 
@sc{gnu} sort follows the POSIX
 
4645
GNU sort follows the POSIX
4344
4646
behavior, which is usually (but not always!) like the System V behavior.
4345
4647
According to POSIX, @option{-n} no longer implies @option{-b}.  For
4346
4648
consistency, @option{-M} has been changed in the same way.  This may
4777
5079
@item prepend
4778
5080
Output a newline before each group of repeated lines.
4779
5081
With @option{--zero-terminated} (@option{-z}), use a zero
4780
 
byte (ASCII @sc{nul}) instead of a newline.
 
5082
byte (ASCII NUL) instead of a newline.
4781
5083
 
4782
5084
@item separate
4783
5085
Separate groups of repeated lines with a single newline.
4784
5086
With @option{--zero-terminated} (@option{-z}), use a zero
4785
 
byte (ASCII @sc{nul}) instead of a newline.
 
5087
byte (ASCII NUL) instead of a newline.
4786
5088
This is the same as using @samp{prepend}, except that
4787
5089
no delimiter is inserted before the first group, and hence
4788
5090
may be better suited for output direct to users.
4793
5095
To avoid that, filter the input through @samp{tr -s '\n'} to replace
4794
5096
each sequence of consecutive newlines with a single newline.
4795
5097
 
4796
 
This is a @sc{gnu} extension.
 
5098
This is a GNU extension.
4797
5099
@c FIXME: give an example showing *how* it's useful
4798
5100
 
4799
5101
@item -u
4915
5217
@end example
4916
5218
 
4917
5219
The @option{-G} (or its equivalent: @option{--traditional}) option disables
4918
 
all @sc{gnu} extensions and reverts to traditional mode, thus introducing some
 
5220
all GNU extensions and reverts to traditional mode, thus introducing some
4919
5221
limitations and changing several of the program's default option values.
4920
 
When @option{-G} is not specified, @sc{gnu} extensions are always enabled.
4921
 
@sc{gnu} extensions to @command{ptx} are documented wherever appropriate in this
 
5222
When @option{-G} is not specified, GNU extensions are always enabled.
 
5223
GNU extensions to @command{ptx} are documented wherever appropriate in this
4922
5224
document.  @xref{Compatibility in ptx}, for the full list.
4923
5225
 
4924
5226
Individual options are explained in the following sections.
4925
5227
 
4926
 
When @sc{gnu} extensions are enabled, there may be zero, one or several
 
5228
When GNU extensions are enabled, there may be zero, one or several
4927
5229
@var{file}s after the options.  If there is no @var{file}, the program
4928
5230
reads the standard input.  If there is one or several @var{file}s, they
4929
5231
give the name of input files which are all read in turn, as if all the
4933
5235
all cases, the program outputs the permuted index to the standard
4934
5236
output.
4935
5237
 
4936
 
When @sc{gnu} extensions are @emph{not} enabled, that is, when the program
 
5238
When GNU extensions are @emph{not} enabled, that is, when the program
4937
5239
operates in traditional mode, there may be zero, one or two parameters
4938
5240
besides the options.  If there are no parameters, the program reads the
4939
5241
standard input and outputs the permuted index to the standard output.
4943
5245
the @var{output} file to produce.  @emph{Be very careful} to note that,
4944
5246
in this case, the contents of file given by the second parameter is
4945
5247
destroyed.  This behavior is dictated by System V @command{ptx}
4946
 
compatibility; @sc{gnu} Standards normally discourage output parameters not
 
5248
compatibility; GNU Standards normally discourage output parameters not
4947
5249
introduced by an option.
4948
5250
 
4949
5251
Note that for @emph{any} file named as the value of an option or as an
4967
5269
 
4968
5270
@item -G
4969
5271
@itemx --traditional
4970
 
As already explained, this option disables all @sc{gnu} extensions to
 
5272
As already explained, this option disables all GNU extensions to
4971
5273
@command{ptx} and switches to traditional mode.
4972
5274
 
4973
5275
@item --help
4990
5292
As it is set up now, the program assumes that the input file is coded
4991
5293
using 8-bit ISO 8859-1 code, also known as Latin-1 character set,
4992
5294
@emph{unless} it is compiled for MS-DOS, in which case it uses the
4993
 
character set of the IBM-PC@.  (@sc{gnu} @command{ptx} is not known to work on
 
5295
character set of the IBM-PC@.  (GNU @command{ptx} is not known to work on
4994
5296
smaller MS-DOS machines anymore.)  Compared to 7-bit ASCII, the set
4995
5297
of characters which are letters is different; this alters the behavior
4996
5298
of regular expression matching.  Thus, the default regular expression
5023
5325
@option{-b} and @option{-W} are specified, then @option{-W} has precedence and
5024
5326
@option{-b} is ignored.
5025
5327
 
5026
 
When @sc{gnu} extensions are enabled, the only way to avoid newline as a
 
5328
When GNU extensions are enabled, the only way to avoid newline as a
5027
5329
break character is to write all the break characters in the file with no
5028
 
newline at all, not even at the end of the file.  When @sc{gnu} extensions
 
5330
newline at all, not even at the end of the file.  When GNU extensions
5029
5331
are disabled, spaces, tabs and newlines are always considered as break
5030
5332
characters even if not included in the Break file.
5031
5333
 
5064
5366
Using this option, the program does not try very hard to remove
5065
5367
references from contexts in output, but it succeeds in doing so
5066
5368
@emph{when} the context ends exactly at the newline.  If option
5067
 
@option{-r} is used with @option{-S} default value, or when @sc{gnu} extensions
 
5369
@option{-r} is used with @option{-S} default value, or when GNU extensions
5068
5370
are disabled, this condition is always met and references are completely
5069
5371
excluded from the output contexts.
5070
5372
 
5075
5377
line or the end of a sentence.  In fact, this regular expression is not
5076
5378
the only distinction between end of lines or end of sentences, and input
5077
5379
line boundaries have no special significance outside this option.  By
5078
 
default, when @sc{gnu} extensions are enabled and if @option{-r} option is not
 
5380
default, when GNU extensions are enabled and if @option{-r} option is not
5079
5381
used, end of sentences are used.  In this case, this @var{regex} is
5080
 
imported from @sc{gnu} Emacs:
 
5382
imported from GNU Emacs:
5081
5383
 
5082
5384
@example
5083
5385
[.?!][]\"')@}]*\\($\\|\t\\|  \\)[ \t\n]*
5084
5386
@end example
5085
5387
 
5086
 
Whenever @sc{gnu} extensions are disabled or if @option{-r} option is used, end
 
5388
Whenever GNU extensions are disabled or if @option{-r} option is used, end
5087
5389
of lines are used; in this case, the default @var{regexp} is just:
5088
5390
 
5089
5391
@example
5115
5417
@itemx --word-regexp=@var{regexp}
5116
5418
 
5117
5419
This option selects which regular expression will describe each keyword.
5118
 
By default, if @sc{gnu} extensions are enabled, a word is a sequence of
5119
 
letters; the @var{regexp} used is @samp{\w+}.  When @sc{gnu} extensions are
 
5420
By default, if GNU extensions are enabled, a word is a sequence of
 
5421
letters; the @var{regexp} used is @samp{\w+}.  When GNU extensions are
5120
5422
disabled, a word is by default anything which ends with a space, a tab
5121
5423
or a newline; the @var{regexp} used is @samp{[^ \t\n]+}.
5122
5424
 
5136
5438
 
5137
5439
Output format is mainly controlled by the @option{-O} and @option{-T} options
5138
5440
described in the table below.  When neither @option{-O} nor @option{-T} are
5139
 
selected, and if @sc{gnu} extensions are enabled, the program chooses an
 
5441
selected, and if GNU extensions are enabled, the program chooses an
5140
5442
output format suitable for a dumb terminal.  Each keyword occurrence is
5141
5443
output to the center of one line, surrounded by its left and right
5142
5444
contexts.  Each field is properly justified, so the concordance output
5143
5445
can be readily observed.  As a special feature, if automatic
5144
5446
references are selected by option @option{-A} and are output before the
5145
5447
left context, that is, if option @option{-R} is @emph{not} selected, then
5146
 
a colon is added after the reference; this nicely interfaces with @sc{gnu}
 
5448
a colon is added after the reference; this nicely interfaces with GNU
5147
5449
Emacs @code{next-error} processing.  In this default output format, each
5148
5450
white space character, like newline and tab, is merely changed to
5149
5451
exactly one space, with no special attempt to compress consecutive
5196
5498
ignored, with one exception:  with @option{-R} the width of references
5197
5499
is @emph{not} taken into account in total output width given by @option{-w}.
5198
5500
 
5199
 
This option is automatically selected whenever @sc{gnu} extensions are
 
5501
This option is automatically selected whenever GNU extensions are
5200
5502
disabled.
5201
5503
 
5202
5504
@item -F @var{string}
5212
5514
the current line to fit in, then a truncation occurs.  By default,
5213
5515
the string used is a single slash, as in @option{-F /}.
5214
5516
 
5215
 
@var{string} may have more than one character, as in @option{-F ...}.
 
5517
@var{string} may have more than one character, as in @option{-F @dots{}}.
5216
5518
Also, in the particular case when @var{string} is empty (@option{-F ""}),
5217
5519
truncation flagging is disabled, and no truncation marks are appended in
5218
5520
this case.
5239
5541
@end smallexample
5240
5542
 
5241
5543
so it will be possible to write a @samp{.xx} roff macro to take care of
5242
 
the output typesetting.  This is the default output format when @sc{gnu}
 
5544
the output typesetting.  This is the default output format when GNU
5243
5545
extensions are disabled.  Option @option{-M} can be used to change
5244
5546
@samp{xx} to another macro name.
5245
5547
 
5285
5587
 
5286
5588
 
5287
5589
@node Compatibility in ptx
5288
 
@subsection The @sc{gnu} extensions to @command{ptx}
 
5590
@subsection The GNU extensions to @command{ptx}
5289
5591
 
5290
5592
This version of @command{ptx} contains a few features which do not exist in
5291
5593
System V @command{ptx}.  These extra features are suppressed by using the
5292
5594
@option{-G} command line option, unless overridden by other command line
5293
 
options.  Some @sc{gnu} extensions cannot be recovered by overriding, so the
5294
 
simple rule is to avoid @option{-G} if you care about @sc{gnu} extensions.
 
5595
options.  Some GNU extensions cannot be recovered by overriding, so the
 
5596
simple rule is to avoid @option{-G} if you care about GNU extensions.
5295
5597
Here are the differences between this program and System V @command{ptx}.
5296
5598
 
5297
5599
@itemize @bullet
5304
5606
@var{file}.
5305
5607
 
5306
5608
Having output parameters not introduced by options is a dangerous
5307
 
practice which @sc{gnu} avoids as far as possible.  So, for using @command{ptx}
5308
 
portably between @sc{gnu} and System V, you should always use it with a
 
5609
practice which GNU avoids as far as possible.  So, for using @command{ptx}
 
5610
portably between GNU and System V, you should always use it with a
5309
5611
single input file, and always expect the result on standard output.  You
5310
5612
might also want to automatically configure in a @option{-G} option to
5311
5613
@command{ptx} calls in products using @command{ptx}, if the configurator finds
5314
5616
@item
5315
5617
The only options available in System V @command{ptx} are options @option{-b},
5316
5618
@option{-f}, @option{-g}, @option{-i}, @option{-o}, @option{-r}, @option{-t} and
5317
 
@option{-w}.  All other options are @sc{gnu} extensions and are not repeated in
 
5619
@option{-w}.  All other options are GNU extensions and are not repeated in
5318
5620
this enumeration.  Moreover, some options have a slightly different
5319
 
meaning when @sc{gnu} extensions are enabled, as explained below.
 
5621
meaning when GNU extensions are enabled, as explained below.
5320
5622
 
5321
5623
@item
5322
5624
By default, concordance output is not formatted for @command{troff} or
5325
5627
 
5326
5628
@item
5327
5629
Unless @option{-R} option is used, the maximum reference width is
5328
 
subtracted from the total output line width.  With @sc{gnu} extensions
 
5630
subtracted from the total output line width.  With GNU extensions
5329
5631
disabled, width of references is not taken into account in the output
5330
5632
line width computations.
5331
5633
 
5332
5634
@item
5333
 
All 256 bytes, even ASCII @sc{nul} bytes, are always read and
5334
 
processed from input file with no adverse effect, even if @sc{gnu} extensions
 
5635
All 256 bytes, even ASCII NUL bytes, are always read and
 
5636
processed from input file with no adverse effect, even if GNU extensions
5335
5637
are disabled.  However, System V @command{ptx} does not accept 8-bit
5336
5638
characters, a few control characters are rejected, and the tilde
5337
5639
@kbd{~} is also rejected.
5338
5640
 
5339
5641
@item
5340
 
Input line length is only limited by available memory, even if @sc{gnu}
 
5642
Input line length is only limited by available memory, even if GNU
5341
5643
extensions are disabled.  However, System V @command{ptx} processes only
5342
5644
the first 200 characters in each line.
5343
5645
 
5344
5646
@item
5345
5647
The break (non-word) characters default to be every character except all
5346
 
letters of the underlying character set, diacriticized or not.  When @sc{gnu}
 
5648
letters of the underlying character set, diacriticized or not.  When GNU
5347
5649
extensions are disabled, the break characters default to space, tab and
5348
5650
newline only.
5349
5651
 
5350
5652
@item
5351
 
The program makes better use of output line width.  If @sc{gnu} extensions
 
5653
The program makes better use of output line width.  If GNU extensions
5352
5654
are disabled, the program rather tries to imitate System V @command{ptx},
5353
5655
but still, there are some slight disposition glitches this program does
5354
5656
not completely reproduce.
5872
6174
Use @samp{sort -t @var{char}}, without the @option{-b} option of
5873
6175
@samp{sort}, to produce this ordering.  If @samp{join -t ''} is specified,
5874
6176
the whole line is considered, matching the default operation of sort.
5875
 
If @samp{-t '\0'} is specified then the ASCII @sc{nul}
 
6177
If @samp{-t '\0'} is specified then the ASCII NUL
5876
6178
character is used to delimit the fields.
5877
6179
 
5878
6180
@item -v @var{file-number}
6005
6307
collate before @var{n}; if it doesn't, an error results.  As an example,
6006
6308
@samp{0-9} is the same as @samp{0123456789}.
6007
6309
 
6008
 
@sc{gnu} @command{tr} does not support the System V syntax that uses square
 
6310
GNU @command{tr} does not support the System V syntax that uses square
6009
6311
brackets to enclose ranges.  Translations specified in that format
6010
6312
sometimes work as expected, since the brackets are often transliterated
6011
6313
to themselves.  However, they should be avoided because they sometimes
6093
6395
equivalent to @var{c}, in no particular order.  Equivalence classes are
6094
6396
a relatively recent invention intended to support non-English alphabets.
6095
6397
But there seems to be no standard way to define them or determine their
6096
 
contents.  Therefore, they are not fully implemented in @sc{gnu} @command{tr};
 
6398
contents.  Therefore, they are not fully implemented in GNU @command{tr};
6097
6399
each character's equivalence class consists only of that character,
6098
6400
which is of no particular use.
6099
6401
 
6141
6443
the last character of @var{set2} as many times as necessary.  System V
6142
6444
@command{tr} truncates @var{set1} to the length of @var{set2}.
6143
6445
 
6144
 
By default, @sc{gnu} @command{tr} handles this case like BSD @command{tr}.
 
6446
By default, GNU @command{tr} handles this case like BSD @command{tr}.
6145
6447
When the @option{--truncate-set1} (@option{-t}) option is given,
6146
 
@sc{gnu} @command{tr} handles this case like the System V @command{tr}
 
6448
GNU @command{tr} handles this case like the System V @command{tr}
6147
6449
instead.  This option is ignored for operations other than translation.
6148
6450
 
6149
6451
Acting like System V @command{tr} in this case breaks the relatively common
6719
7021
@opindex -G
6720
7022
@opindex --no-group
6721
7023
Inhibit display of group information in a long format directory listing.
6722
 
(This is the default in some non-@sc{gnu} versions of @command{ls}, so we
 
7024
(This is the default in some non-GNU versions of @command{ls}, so we
6723
7025
provide this option for compatibility.)
6724
7026
 
6725
7027
@optHumanReadable
7072
7374
List files in columns, sorted vertically.  This is the default for
7073
7375
@command{ls} if standard output is a terminal.  It is always the default
7074
7376
for the @command{dir} program.
7075
 
@sc{gnu} @command{ls} uses variable width columns to display as many files as
 
7377
GNU @command{ls} uses variable width columns to display as many files as
7076
7378
possible in the fewest lines.
7077
7379
 
7078
7380
@item --color [=@var{when}]
7686
7988
@example
7687
7989
#!/bin/sh
7688
7990
# Usage: backup FILE...
7689
 
# Create a @sc{gnu}-style backup of each listed FILE.
 
7991
# Create a GNU-style backup of each listed FILE.
7690
7992
fail=0
7691
7993
for i; do
7692
7994
  cp --backup --force --preserve=all -- "$i" "$i" || fail=1
7734
8036
This option is independent of the @option{--interactive} or
7735
8037
@option{-i} option: neither cancels the effect of the other.
7736
8038
 
7737
 
This option is redundant if the @option{--no-clobber} or @option{-n} option is
7738
 
used.
 
8039
This option is ignored when the @option{--no-clobber} or @option{-n} option
 
8040
is also used.
7739
8041
 
7740
8042
@item -H
7741
8043
@opindex -H
7838
8140
Preserve extended attributes of the file, or fail with full diagnostics.
7839
8141
If @command{cp} is built without xattr support, ignore this option.
7840
8142
If SELinux context, ACLs or Capabilities are implemented using xattrs,
7841
 
they are preserved by this option as well.
 
8143
they are preserved implicitly by this option as well, i.e., even without
 
8144
specifying @option{--preserve=mode} or @option{--preserve=context}.
7842
8145
@item all
7843
8146
Preserve all file attributes.
7844
8147
Equivalent to specifying all of the above, but with the difference
7893
8196
creating a destination file of the same type as the source; see the
7894
8197
@option{--copy-contents} option.  It is not portable to use
7895
8198
@option{-r} to copy symbolic links or special files.  On some
7896
 
non-@sc{gnu} systems, @option{-r} implies the equivalent of
 
8199
non-GNU systems, @option{-r} implies the equivalent of
7897
8200
@option{-L} and @option{--copy-contents} for historical reasons.
7898
8201
Also, it is not portable to use @option{-R} to copy symbolic links
7899
8202
unless you also specify @option{-P}, as POSIX allows
8045
8348
@end example
8046
8349
 
8047
8350
The only options are @option{--help} and @option{--version}.
8048
 
@xref{Common options}.  @command{dd} accepts the following operands.
 
8351
@xref{Common options}.  @command{dd} accepts the following operands,
 
8352
whose syntax was inspired by the DD (data definition) statement of
 
8353
OS/360 JCL.
8049
8354
 
8050
8355
@table @samp
8051
8356
 
8114
8419
of everything until the end of the file.
8115
8420
if @samp{iflag=count_bytes} is specified, @var{n} is interpreted
8116
8421
as a byte count rather than a block count.
 
8422
Note if the input may return short reads as could be the case
 
8423
when reading from a pipe for example, @samp{iflag=fullblock}
 
8424
will ensure that @samp{count=} corresponds to complete input blocks
 
8425
rather than the traditional POSIX specified behavior of counting
 
8426
input read operations.
8117
8427
 
8118
8428
@item status=@var{which}
8119
8429
@opindex status
8189
8499
 
8190
8500
@item sparse
8191
8501
@opindex sparse
8192
 
Try to seek rather than write @sc{nul} output blocks.
 
8502
Try to seek rather than write NUL output blocks.
8193
8503
On a file system that supports sparse files, this will create
8194
8504
sparse output when extending the output file.
8195
8505
Be careful when using this option in conjunction with
8196
8506
@samp{conv=notrunc} or @samp{oflag=append}.
8197
8507
With @samp{conv=notrunc}, existing data in the output file
8198
 
corresponding to @sc{nul} blocks from the input, will be untouched.
 
8508
corresponding to NUL blocks from the input, will be untouched.
8199
8509
With @samp{oflag=append} the seeks performed will be ineffective.
8200
8510
Similarly, when the output is a device rather than a file,
8201
 
@sc{nul} input blocks are not copied, and therefore this option
 
8511
NUL input blocks are not copied, and therefore this option
8202
8512
is most useful with virtual or pre zeroed devices.
8203
8513
 
8204
8514
@item swab
8205
8515
@opindex swab @r{(byte-swapping)}
8206
8516
@cindex byte-swapping
8207
 
Swap every pair of input bytes.  @sc{gnu} @command{dd}, unlike others, works
 
8517
Swap every pair of input bytes.  GNU @command{dd}, unlike others, works
8208
8518
when an odd number of bytes are read---the last byte is simply copied
8209
8519
(since there is nothing to swap it with).
8210
8520
 
8211
8521
@item sync
8212
 
@opindex sync @r{(padding with ASCII @sc{nul}s)}
 
8522
@opindex sync @r{(padding with ASCII NULs)}
8213
8523
Pad every input block to size of @samp{ibs} with trailing zero bytes.
8214
8524
When used with @samp{block} or @samp{unblock}, pad with spaces instead of
8215
8525
zero bytes.
8394
8704
When that happens, continue calling @code{read} to fill the remainder
8395
8705
of the block.
8396
8706
This flag can be used only with @code{iflag}.
 
8707
This flag is useful with pipes for example
 
8708
as they may return short reads. In that case,
 
8709
this flag is needed to ensure that a @samp{count=} argument is
 
8710
interpreted as a block count rather than a count of read operations.
8397
8711
 
8398
8712
@item count_bytes
8399
8713
@opindex count_bytes
8935
9249
@cindex files beginning with @samp{-}, removing
8936
9250
@cindex @samp{-}, removing files beginning with
8937
9251
One common question is how to remove files whose names begin with a
8938
 
@samp{-}.  @sc{gnu} @command{rm}, like every program that uses the @code{getopt}
 
9252
@samp{-}.  GNU @command{rm}, like every program that uses the @code{getopt}
8939
9253
function to parse its arguments, lets you use the @samp{--} option to
8940
9254
indicate that all following arguments are non-options.  To remove a file
8941
9255
called @file{-f} in the current directory, you could type either:
9734
10048
 
9735
10049
@item Readlink mode
9736
10050
 
9737
 
@command{readlink} outputs the value of the given symbolic link.
 
10051
@command{readlink} outputs the value of the given symbolic links.
9738
10052
If @command{readlink} is invoked with an argument other than the name
9739
10053
of a symbolic link, it produces no output and exits with a nonzero exit code.
9740
10054
 
9741
10055
@item Canonicalize mode
9742
10056
 
9743
 
@command{readlink} outputs the absolute name of the given file which contains
 
10057
@command{readlink} outputs the absolute name of the given files which contain
9744
10058
no @file{.}, @file{..} components nor any repeated separators
9745
10059
(@file{/}) or symbolic links.
9746
10060
 
9747
10061
@end table
9748
10062
 
9749
10063
@example
9750
 
readlink [@var{option}] @var{file}
 
10064
readlink [@var{option}]@dots{} @var{file}@dots{}
9751
10065
@end example
9752
10066
 
9753
10067
By default, @command{readlink} operates in readlink mode.
9786
10100
@itemx --no-newline
9787
10101
@opindex -n
9788
10102
@opindex --no-newline
9789
 
Do not output the trailing newline.
 
10103
Do not print the output delimiter, when a single @var{file} is specified.
 
10104
Print a warning if specified along with multiple @var{file}s.
9790
10105
 
9791
10106
@item -s
9792
10107
@itemx -q
9804
10119
@opindex --verbose
9805
10120
Report error messages.
9806
10121
 
 
10122
@item -z
 
10123
@itemx --zero
 
10124
@opindex -z
 
10125
@opindex --zero
 
10126
Separate output items with NUL characters.
 
10127
 
9807
10128
@end table
9808
10129
 
9809
10130
The @command{readlink} utility first appeared in OpenBSD 2.1.
10443
10764
not set.  @xref{TZ Variable,, Specifying the Time Zone with @env{TZ},
10444
10765
libc, The GNU C Library Reference Manual}.
10445
10766
You can avoid ambiguities during
10446
 
daylight saving transitions by using @sc{utc} time stamps.
 
10767
daylight saving transitions by using UTC time stamps.
10447
10768
 
10448
10769
The program accepts the following options.  Also see @ref{Common options}.
10449
10770
 
10597
10918
1024 bytes, but this can be overridden (@pxref{Block size}).
10598
10919
Non-integer quantities are rounded up to the next higher unit.
10599
10920
 
 
10921
For bind mounts and without arguments, @command{df} only outputs the statistics
 
10922
for that device with the shortest mount point name in the list of file systems
 
10923
(@var{mtab}), i.e., it hides duplicate entries, unless the @option{-a} option is
 
10924
specified.
 
10925
 
 
10926
With the same logic, @command{df} elides a mount entry of a dummy pseude device
 
10927
if there is another mount entry of a real block device for that mount point with
 
10928
the same device number, e.g. the early-boot pseudo file system @samp{rootfs} is
 
10929
not shown per default when already the real root device has been mounted.
 
10930
 
10600
10931
@cindex disk device file
10601
10932
@cindex device file, disk
10602
10933
If an argument @var{file} is a disk device file containing a mounted
10603
10934
file system, @command{df} shows the space available on that file system
10604
10935
rather than on the file system containing the device node (i.e., the root
10605
 
file system).  @sc{gnu} @command{df} does not attempt to determine the
 
10936
file system).  GNU @command{df} does not attempt to determine the
10606
10937
disk usage
10607
10938
on unmounted file systems, because on most kinds of systems doing so
10608
10939
requires extremely nonportable intimate knowledge of file system
10637
10968
been processed.  This can be used to find out the total disk size, usage
10638
10969
and available space of all listed devices.
10639
10970
 
 
10971
For the grand total line, @command{df} prints @samp{"total"} into the
 
10972
@var{source} column, and @samp{"-"} into the @var{target} column.
 
10973
If there is no @var{source} column (see @option{--output}), then
 
10974
@command{df} prints @samp{"total"} into the @var{target} column,
 
10975
if present.
 
10976
 
10640
10977
@optHumanReadable
10641
10978
 
10642
10979
@item -H
10675
11012
disks, but on some systems (notably SunOS) the results may be slightly
10676
11013
out of date.  This is the default.
10677
11014
 
 
11015
@item --output
 
11016
@itemx @w{@kbd{--output}[=@var{field_list}]}
 
11017
@opindex --output
 
11018
Use the output format defined by @var{field_list}, or print all fields if
 
11019
@var{field_list} is omitted.  In the latter case, the order of the columns
 
11020
conforms to the order of the field descriptions below.
 
11021
 
 
11022
The use of the @option{--output} together with each of the options @option{-i},
 
11023
@option{-P}, and @option{-T} is mutually exclusive.
 
11024
 
 
11025
FIELD_LIST is a comma-separated list of columns to be included in @command{df}'s
 
11026
output and therefore effectively controls the order of output columns.
 
11027
Each field can thus be used at the place of choice, but yet must only be
 
11028
used once.
 
11029
 
 
11030
Valid field names in the @var{field_list} are:
 
11031
@table @samp
 
11032
@item source
 
11033
The source of the mount point, usually a device.
 
11034
@item fstype
 
11035
File system type.
 
11036
 
 
11037
@item itotal
 
11038
Total number of inodes.
 
11039
@item iused
 
11040
Number of used inodes.
 
11041
@item iavail
 
11042
Number of available inodes.
 
11043
@item ipcent
 
11044
Percentage of @var{iused} divided by @var{itotal}.
 
11045
 
 
11046
@item size
 
11047
Total number of blocks.
 
11048
@item used
 
11049
Number of used blocks.
 
11050
@item avail
 
11051
Number of available blocks.
 
11052
@item pcent
 
11053
Percentage of @var{used} divided by @var{size}.
 
11054
 
 
11055
@item target
 
11056
The mount point.
 
11057
@end table
 
11058
 
 
11059
The fields for block and inodes statistics are affected by the scaling
 
11060
options like @option{-h} as usual.
 
11061
 
 
11062
The definition of the @var{field_list} can even be splitted among several
 
11063
@option{--output} uses.
 
11064
 
 
11065
@example
 
11066
#!/bin/sh
 
11067
# Print the TARGET (i.e., the mount point) along with their percentage
 
11068
# statistic regarding the blocks and the inodes.
 
11069
df --out=target --output=pcent,ipcent
 
11070
 
 
11071
# Print all available fields.
 
11072
df --o
 
11073
@end example
 
11074
 
 
11075
 
10678
11076
@item -P
10679
11077
@itemx --portability
10680
11078
@opindex -P
10821
11219
 
10822
11220
@table @samp
10823
11221
 
 
11222
@optNull{du}
 
11223
 
10824
11224
@item -a
10825
11225
@itemx --all
10826
11226
@opindex -a
10846
11246
has an apparent size of 2 GiB, yet on most modern
10847
11247
systems, it actually uses almost no disk space.
10848
11248
 
 
11249
@item -B @var{size}
 
11250
@itemx --block-size=@var{size}
 
11251
@opindex -B
 
11252
@opindex --block-size
 
11253
@cindex file sizes
 
11254
Scale sizes by @var{size} before printing them (@pxref{Block size}).
 
11255
For example, @option{-BG} prints sizes in units of 1,073,741,824 bytes.
 
11256
 
10849
11257
@item -b
10850
11258
@itemx --bytes
10851
11259
@opindex -b
10852
11260
@opindex --bytes
10853
11261
Equivalent to @code{--apparent-size --block-size=1}.
10854
11262
 
10855
 
@item -B @var{size}
10856
 
@itemx --block-size=@var{size}
10857
 
@opindex -B
10858
 
@opindex --block-size
10859
 
@cindex file sizes
10860
 
Scale sizes by @var{size} before printing them (@pxref{Block size}).
10861
 
For example, @option{-BG} prints sizes in units of 1,073,741,824 bytes.
10862
 
 
10863
11263
@item -c
10864
11264
@itemx --total
10865
11265
@opindex -c
10878
11278
out the disk usage of directories, such as @file{/usr/tmp}, which
10879
11279
are often symbolic links.
10880
11280
 
 
11281
@item -d @var{depth}
 
11282
@itemx --max-depth=@var{depth}
 
11283
@opindex -d @var{depth}
 
11284
@opindex --max-depth=@var{depth}
 
11285
@cindex limiting output of @command{du}
 
11286
Show the total for each directory (and file if --all) that is at
 
11287
most MAX_DEPTH levels down from the root of the hierarchy.  The root
 
11288
is at level 0, so @code{du --max-depth=0} is equivalent to @code{du -s}.
 
11289
 
10881
11290
@c --files0-from=FILE
10882
11291
@filesZeroFromOption{du,, with the @option{--total} (@option{-c}) option}
10883
11292
 
10884
 
@optHumanReadable
10885
 
 
10886
11293
@item -H
10887
11294
@opindex -H
10888
11295
Equivalent to @option{--dereference-args} (@option{-D}).
10889
11296
 
 
11297
@optHumanReadable
 
11298
 
10890
11299
@item -k
10891
11300
@opindex -k
10892
11301
@cindex kibibytes for file sizes
10894
11303
(@pxref{Block size}).
10895
11304
This option is equivalent to @option{--block-size=1K}.
10896
11305
 
 
11306
@item -L
 
11307
@itemx --dereference
 
11308
@opindex -L
 
11309
@opindex --dereference
 
11310
@cindex symbolic links, dereferencing in @command{du}
 
11311
Dereference symbolic links (show the disk space used by the file
 
11312
or directory that the link points to instead of the space used by
 
11313
the link).
 
11314
 
10897
11315
@item -l
10898
11316
@itemx --count-links
10899
11317
@opindex -l
10902
11320
Count the size of all files, even if they have appeared already (as a
10903
11321
hard link).
10904
11322
 
10905
 
@item -L
10906
 
@itemx --dereference
10907
 
@opindex -L
10908
 
@opindex --dereference
10909
 
@cindex symbolic links, dereferencing in @command{du}
10910
 
Dereference symbolic links (show the disk space used by the file
10911
 
or directory that the link points to instead of the space used by
10912
 
the link).
10913
 
 
10914
11323
@item -m
10915
11324
@opindex -m
10916
11325
@cindex mebibytes for file sizes
10926
11335
For each symbolic links encountered by @command{du},
10927
11336
consider the disk space used by the symbolic link.
10928
11337
 
10929
 
@item -d @var{depth}
10930
 
@item --max-depth=@var{depth}
10931
 
@opindex -d @var{depth}
10932
 
@opindex --max-depth=@var{depth}
10933
 
@cindex limiting output of @command{du}
10934
 
Show the total for each directory (and file if --all) that is at
10935
 
most MAX_DEPTH levels down from the root of the hierarchy.  The root
10936
 
is at level 0, so @code{du --max-depth=0} is equivalent to @code{du -s}.
10937
 
 
10938
 
@optNull{du}
10939
 
 
10940
 
@optSi
10941
 
 
10942
 
@item -s
10943
 
@itemx --summarize
10944
 
@opindex -s
10945
 
@opindex --summarize
10946
 
Display only a total for each argument.
10947
 
 
10948
11338
@item -S
10949
11339
@itemx --separate-dirs
10950
11340
@opindex -S
10956
11346
@var{d}, is merely the @code{stat.st_size}-derived size of the directory
10957
11347
entry, @var{d}.
10958
11348
 
 
11349
@optSi
 
11350
 
 
11351
@item -s
 
11352
@itemx --summarize
 
11353
@opindex -s
 
11354
@opindex --summarize
 
11355
Display only a total for each argument.
 
11356
 
 
11357
@item -t @var{size}
 
11358
@itemx --threshold=@var{size}
 
11359
@opindex -t
 
11360
@opindex --threshold
 
11361
Exclude entries based on a given @var{size} (@pxref{Block size}).
 
11362
 
 
11363
If @var{size} is positive, then @command{du} will only print entries with a size
 
11364
greater than or equal to that.
 
11365
 
 
11366
If @var{size} is negative, then @command{du} will only print entries with a size
 
11367
smaller than or equal to that.
 
11368
 
 
11369
Although GNU @command{find} can be used to find files of a certain size,
 
11370
@command{du}'s @option{--threshold} option can be used to also filter
 
11371
directories based on a given size.
 
11372
 
 
11373
Please note that the @option{--threshold} option can be combined with the
 
11374
@option{--apparent-size} option, and in this case would elide entries based on
 
11375
its apparent size.
 
11376
 
 
11377
Here's how you would use @option{--threshold} to find directories with a size
 
11378
greater than or equal to 200 megabytes:
 
11379
 
 
11380
@example
 
11381
du --threshold=200MB
 
11382
@end example
 
11383
 
 
11384
Here's how you would use @option{--threshold} to find directories and files -
 
11385
note the @option{-a} - with an apparent size smaller than or equal to 500 bytes:
 
11386
 
 
11387
@example
 
11388
du -a -t -500 --apparent-size
 
11389
@end example
 
11390
 
 
11391
 
10959
11392
@item --time
10960
11393
@opindex --time
10961
11394
@cindex last modified dates, displaying in @command{du}
11023
11456
begins with @samp{posix-} the @samp{posix-} is ignored; and if
11024
11457
@env{TIME_STYLE} is @samp{locale} it is ignored.
11025
11458
 
11026
 
@item -x
11027
 
@itemx --one-file-system
11028
 
@opindex -x
11029
 
@opindex --one-file-system
11030
 
@cindex one file system, restricting @command{du} to
11031
 
Skip directories that are on different file systems from the one that
11032
 
the argument being processed is on.
11033
 
 
11034
 
@item --exclude=@var{pattern}
11035
 
@opindex --exclude=@var{pattern}
11036
 
@cindex excluding files from @command{du}
11037
 
When recursing, skip subdirectories or files matching @var{pattern}.
11038
 
For example, @code{du --exclude='*.o'} excludes files whose names
11039
 
end in @samp{.o}.
11040
 
 
11041
11459
@item -X @var{file}
11042
11460
@itemx --exclude-from=@var{file}
11043
11461
@opindex -X @var{file}
11047
11465
one per line.  If @var{file} is @samp{-}, take the patterns from standard
11048
11466
input.
11049
11467
 
 
11468
@item --exclude=@var{pattern}
 
11469
@opindex --exclude=@var{pattern}
 
11470
@cindex excluding files from @command{du}
 
11471
When recursing, skip subdirectories or files matching @var{pattern}.
 
11472
For example, @code{du --exclude='*.o'} excludes files whose names
 
11473
end in @samp{.o}.
 
11474
 
 
11475
@item -x
 
11476
@itemx --one-file-system
 
11477
@opindex -x
 
11478
@opindex --one-file-system
 
11479
@cindex one file system, restricting @command{du} to
 
11480
Skip directories that are on different file systems from the one that
 
11481
the argument being processed is on.
 
11482
 
11050
11483
@end table
11051
11484
 
11052
11485
@cindex NFS mounts from BSD to HP-UX
11548
11981
characters, specified as eight hexadecimal digits @var{hhhhhhhh}.
11549
11982
@command{printf} outputs the Unicode characters
11550
11983
according to the @env{LC_CTYPE} locale.  Unicode characters in the ranges
11551
 
U+0000...U+009F, U+D800...U+DFFF cannot be specified by this syntax, except
11552
 
for U+0024 ($), U+0040 (@@), and U+0060 (@`).
 
11984
U+0000@dots{}U+009F, U+D800@dots{}U+DFFF cannot be specified by this syntax,
 
11985
except for U+0024 ($), U+0040 (@@), and U+0060 (@`).
11553
11986
 
11554
11987
The processing of @samp{\u} and @samp{\U} requires a full-featured
11555
11988
@code{iconv} facility.  It is activated on systems with glibc 2.2 (or newer),
12059
12492
operand should not be a parenthesis or any of @command{expr}'s
12060
12493
operators like @code{+}, so you cannot safely pass an arbitrary string
12061
12494
@code{$str} to expr merely by quoting it to the shell.  One way to
12062
 
work around this is to use the @sc{gnu} extension @code{+},
 
12495
work around this is to use the GNU extension @code{+},
12063
12496
(e.g., @code{+ "$str" = foo}); a more portable way is to use
12064
12497
@code{@w{" $str"}} and to adjust the rest of the expression to take
12065
12498
the leading space into account (e.g., @code{@w{" $str" = " foo"}}).
12392
12825
Note, however, that this example relies on a feature of modern shells
12393
12826
called @dfn{process substitution}
12394
12827
(the @samp{>(command)} syntax, above;
12395
 
@xref{Process Substitution,,Process Substitution, bashref,
 
12828
@xref{Process Substitution,,Process Substitution, bash,
12396
12829
The Bash Reference Manual}.),
12397
12830
so it works with @command{zsh}, @command{bash}, and @command{ksh},
12398
12831
but not with @command{/bin/sh}.  So if you write code like this
12502
12935
 
12503
12936
@example
12504
12937
basename @var{name} [@var{suffix}]
12505
 
basename @var{option}... @var{name}...
 
12938
basename @var{option}@dots{} @var{name}@dots{}
12506
12939
@end example
12507
12940
 
12508
12941
If @var{suffix} is specified and is identical to the end of @var{name},
12550
12983
@itemx --zero
12551
12984
@opindex -z
12552
12985
@opindex --zero
12553
 
Separate output items with @sc{nul} characters.
 
12986
Separate output items with NUL characters.
12554
12987
 
12555
12988
@end table
12556
12989
 
12587
13020
prints @samp{.} (meaning the current directory).  Synopsis:
12588
13021
 
12589
13022
@example
12590
 
dirname [@var{option}] @var{name}...
 
13023
dirname [@var{option}] @var{name}@dots{}
12591
13024
@end example
12592
13025
 
12593
13026
@var{name} need not be a file name, but if it is, this operation
12609
13042
@itemx --zero
12610
13043
@opindex -z
12611
13044
@opindex --zero
12612
 
Separate output items with @sc{nul} characters.
 
13045
Separate output items with NUL characters.
12613
13046
 
12614
13047
@end table
12615
13048
 
12957
13390
@itemx --zero
12958
13391
@opindex -z
12959
13392
@opindex --zero
12960
 
Separate output items with @sc{nul} characters.
 
13393
Separate output items with NUL characters.
12961
13394
 
12962
13395
@item --relative-to=@var{file}
12963
13396
@opindex --relative-to
13202
13635
@cindex flow control, hardware
13203
13636
@cindex RTS/CTS flow control
13204
13637
Enable RTS/CTS flow control.  Non-POSIX@.  May be negated.
 
13638
 
 
13639
@item cdtrdsr
 
13640
@opindex cdtrdsr
 
13641
@cindex hardware flow control
 
13642
@cindex flow control, hardware
 
13643
@cindex DTR/DSR flow control
 
13644
Enable DTR/DSR flow control. Non-POSIX@.  May be negated.
13205
13645
@end table
13206
13646
 
13207
13647
 
13345
13785
@item ofdel
13346
13786
@opindex ofdel
13347
13787
@cindex pad character
13348
 
Use ASCII @sc{del} characters for fill instead of
13349
 
ASCII @sc{nul} characters.  Non-POSIX@.
 
13788
Use ASCII DEL characters for fill instead of
 
13789
ASCII NUL characters.  Non-POSIX@.
13350
13790
May be negated.
13351
13791
 
13352
13792
@item nl1
14697
15137
Use Coordinated Universal Time (UTC) by operating as if the
14698
15138
@env{TZ} environment variable were set to the string @samp{UTC0}.
14699
15139
Coordinated
14700
 
Universal Time is often called ``Greenwich Mean Time'' (@sc{gmt}) for
 
15140
Universal Time is often called ``Greenwich Mean Time'' (GMT) for
14701
15141
historical reasons.
14702
15142
Typically, systems ignore leap seconds and thus implement an
14703
15143
approximation to UTC rather than true UTC.
15190
15630
 
15191
15631
@table @samp
15192
15632
 
 
15633
@item --dereference
 
15634
@opindex --dereference
 
15635
Do not affect symbolic links but what they refer to; this is the default.
 
15636
 
15193
15637
@item -h
15194
15638
@itemx --no-dereference
15195
15639
@opindex -h
15196
15640
@opindex --no-dereference
15197
15641
@cindex no dereference
15198
 
Affect symbolic links instead of any referenced file.
 
15642
Affect the symbolic links themselves instead of any referenced file.
15199
15643
 
15200
15644
@item --reference=@var{rfile}
15201
15645
@opindex --reference
15208
15652
@opindex --recursive
15209
15653
Operate on files and directories recursively.
15210
15654
 
 
15655
@item --preserve-root
 
15656
@opindex --preserve-root
 
15657
Refuse to operate recursively on the root directory, @file{/},
 
15658
when used together with the @option{--recursive} option.
 
15659
@xref{Treating / specially}.
 
15660
 
 
15661
@item --no-preserve-root
 
15662
@opindex --no-preserve-root
 
15663
Do not treat the root directory, @file{/}, specially when operating
 
15664
recursively; this is the default.
 
15665
@xref{Treating / specially}.
 
15666
 
15211
15667
@choptH
15212
15668
@xref{Traversing symlinks}.
15213
15669
 
15458
15914
mention the same variable the earlier is ignored.
15459
15915
 
15460
15916
Environment variable names can be empty, and can contain any
15461
 
characters other than @samp{=} and ASCII @sc{nul}.
 
15917
characters other than @samp{=} and ASCII NUL.
15462
15918
However, it is wise to limit yourself to names that
15463
15919
consist solely of underscores, digits, and ASCII letters,
15464
15920
and that begin with a non-digit, as applications like the shell do not
15592
16048
@cindex scheduling, affecting
15593
16049
@cindex appropriate privileges
15594
16050
 
15595
 
@command{nice} prints or modifies a process's @dfn{niceness},
15596
 
a parameter that affects whether the process is scheduled favorably.
 
16051
@command{nice} prints a process's @dfn{niceness}, or runs
 
16052
a command with modified niceness.  @dfn{niceness} affects how
 
16053
favorably the process is scheduled in the system.
15597
16054
Synopsis:
15598
16055
 
15599
16056
@example
15628
16085
 
15629
16086
@mayConflictWithShellBuiltIn{nice}
15630
16087
 
 
16088
Note to change the @dfn{niceness} of an existing process,
 
16089
one needs to use the @command{renice} command.
 
16090
 
15631
16091
The program accepts the following option.  Also see @ref{Common options}.
15632
16092
Options must precede operands.
15633
16093
 
15890
16350
Options must precede operands.
15891
16351
 
15892
16352
@table @samp
 
16353
@item --preserve-status
 
16354
@opindex --preserve-status
 
16355
Return the exit status of the managed @var{command} on timeout, rather than
 
16356
a specific exit status indicating a timeout.  This is useful if the
 
16357
managed @var{command} supports running for an indeterminite amount of time.
 
16358
 
15893
16359
@item --foreground
15894
16360
@opindex --foreground
15895
16361
Don't create a separate background program group, so that
16411
16877
For filter programs to work together, the format of the data has to be
16412
16878
agreed upon.  The most straightforward and easiest format to use is simply
16413
16879
lines of text.  Unix data files are generally just streams of bytes, with
16414
 
lines delimited by the ASCII @sc{lf} (Line Feed) character,
 
16880
lines delimited by the ASCII LF (Line Feed) character,
16415
16881
conventionally called a ``newline'' in the Unix literature.  (This is
16416
16882
@code{'\n'} if you're a C programmer.)  This is the format used by all
16417
16883
the traditional filtering programs.  (Many earlier operating systems