Skip to content

Commit 260d1c4

Browse files
committed
deploy: 2ed80ff
1 parent 004a4a9 commit 260d1c4

31 files changed

+1346
-10
lines changed

user/print.html

+672-4
Large diffs are not rendered by default.

user/searchindex.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

user/searchindex.json

+1-1
Large diffs are not rendered by default.

user/utils/arch.html

+1
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ <h2 id="options"><a class="header" href="#options">Options</a></h2>
189189
<p>Print version information</p>
190190
</dd>
191191
</dl>
192+
<p>Determine architecture name for current machine.</p>
192193
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
193194
<p>Display the system's architecture:</p>
194195
<pre><code class="language-shell">arch

user/utils/base64.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,9 @@ <h1 id="base64"><a class="header" href="#base64">base64</a></h1>
180180
</code></pre>
181181
<p>encode/decode data and print to standard output
182182
With no FILE, or when FILE is -, read standard input.</p>
183-
<p>The data are encoded as described for the base32 alphabet in RFC
184-
4648. When decoding, the input may contain newlines in addition
185-
to the bytes of the formal base32 alphabet. Use --ignore-garbage
183+
<p>The data are encoded as described for the base64 alphabet in RFC
184+
3548. When decoding, the input may contain newlines in addition
185+
to the bytes of the formal base64 alphabet. Use --ignore-garbage
186186
to attempt to recover from any other non-alphabet bytes in the
187187
encoded stream.</p>
188188
<h2 id="options"><a class="header" href="#options">Options</a></h2>

user/utils/csplit.html

+1
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ <h2 id="options"><a class="header" href="#options">Options</a></h2>
223223
<p>Print version information</p>
224224
</dd>
225225
</dl>
226+
<p>Output pieces of FILE separated by PATTERN(s) to files 'xx00', 'xx01', ..., and output byte counts of each piece to standard output.</p>
226227
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
227228
<p>Split a file at lines 5 and 23:</p>
228229
<pre><code class="language-shell">csplit {{file}} {{5}} {{23}}

user/utils/cut.html

+72
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,78 @@ <h2 id="options"><a class="header" href="#options">Options</a></h2>
224224
<p>Print version information</p>
225225
</dd>
226226
</dl>
227+
<p>Each call must specify a mode (what to use for columns),
228+
a sequence (which columns to print), and provide a data source</p>
229+
<p>Specifying a mode</p>
230+
<pre><code>Use --bytes (-b) or --characters (-c) to specify byte mode
231+
232+
Use --fields (-f) to specify field mode, where each line is broken into
233+
fields identified by a delimiter character. For example for a typical CSV
234+
you could use this in combination with setting comma as the delimiter
235+
</code></pre>
236+
<p>Specifying a sequence</p>
237+
<pre><code>A sequence is a group of 1 or more numbers or inclusive ranges separated
238+
by a commas.
239+
240+
cut -f 2,5-7 some_file.txt
241+
will display the 2nd, 5th, 6th, and 7th field for each source line
242+
243+
Ranges can extend to the end of the row by excluding the the second number
244+
245+
cut -f 3- some_file.txt
246+
will display the 3rd field and all fields after for each source line
247+
248+
The first number of a range can be excluded, and this is effectively the
249+
same as using 1 as the first number: it causes the range to begin at the
250+
first column. Ranges can also display a single column
251+
252+
cut -f 1,3-5 some_file.txt
253+
will display the 1st, 3rd, 4th, and 5th field for each source line
254+
255+
The --complement option, when used, inverts the effect of the sequence
256+
257+
cut --complement -f 4-6 some_file.txt
258+
will display the every field but the 4th, 5th, and 6th
259+
</code></pre>
260+
<p>Specifying a data source</p>
261+
<pre><code>If no sourcefile arguments are specified, stdin is used as the source of
262+
lines to print
263+
264+
If sourcefile arguments are specified, stdin is ignored and all files are
265+
read in consecutively if a sourcefile is not successfully read, a warning
266+
will print to stderr, and the eventual status code will be 1, but cut
267+
will continue to read through proceeding sourcefiles
268+
269+
To print columns from both STDIN and a file argument, use - (dash) as a
270+
sourcefile argument to represent stdin.
271+
</code></pre>
272+
<p>Field Mode options</p>
273+
<pre><code>The fields in each line are identified by a delimiter (separator)
274+
275+
Set the delimiter
276+
Set the delimiter which separates fields in the file using the
277+
--delimiter (-d) option. Setting the delimiter is optional.
278+
If not set, a default delimiter of Tab will be used.
279+
280+
Optionally Filter based on delimiter
281+
If the --only-delimited (-s) flag is provided, only lines which
282+
contain the delimiter will be printed
283+
284+
Replace the delimiter
285+
If the --output-delimiter option is provided, the argument used for
286+
it will replace the delimiter character in each line printed. This is
287+
useful for transforming tabular data - e.g. to convert a CSV to a
288+
TSV (tab-separated file)
289+
</code></pre>
290+
<p>Line endings</p>
291+
<pre><code>When the --zero-terminated (-z) option is used, cut sees \0 (null) as the
292+
'line ending' character (both for the purposes of reading lines and
293+
separating printed lines) instead of \n (newline). This is useful for
294+
tabular data where some of the cells may contain newlines
295+
296+
echo 'ab\0cd' | cut -z -c 1
297+
will result in 'a\0c\0'
298+
</code></pre>
227299
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
228300
<p>Print a specific character/field range of each line:</p>
229301
<pre><code class="language-shell">{{command}} | cut --{{characters|fields}}={{1|1,10|1-10|1-|-10}}

user/utils/dd.html

+110
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,116 @@ <h2 id="options"><a class="header" href="#options">Options</a></h2>
192192
<p>Print version information</p>
193193
</dd>
194194
</dl>
195+
<p>OPERANDS:</p>
196+
<pre><code>bs=BYTES read and write up to BYTES bytes at a time (default: 512);
197+
overwrites ibs and obs.
198+
cbs=BYTES the 'conversion block size' in bytes. Applies to
199+
the conv=block, and conv=unblock operations.
200+
conv=CONVS a comma-separated list of conversion options or
201+
(for legacy reasons) file flags.
202+
count=N stop reading input after N ibs-sized read operations rather
203+
than proceeding until EOF. See iflag=count_bytes if stopping
204+
after N bytes is preferred
205+
ibs=N the size of buffer used for reads (default: 512)
206+
if=FILE the file used for input. When not specified, stdin is used instead
207+
iflag=FLAGS a comma-separated list of input flags which specify how the input
208+
source is treated. FLAGS may be any of the input-flags or
209+
general-flags specified below.
210+
skip=N (or iseek=N) skip N ibs-sized records into input before beginning
211+
copy/convert operations. See iflag=seek_bytes if seeking N bytes
212+
is preferred.
213+
obs=N the size of buffer used for writes (default: 512)
214+
of=FILE the file used for output. When not specified, stdout is used
215+
instead
216+
oflag=FLAGS comma separated list of output flags which specify how the output
217+
source is treated. FLAGS may be any of the output flags or
218+
general flags specified below
219+
seek=N (or oseek=N) seeks N obs-sized records into output before
220+
beginning copy/convert operations. See oflag=seek_bytes if
221+
seeking N bytes is preferred
222+
status=LEVEL controls whether volume and performance stats are written to
223+
stderr.
224+
225+
When unspecified, dd will print stats upon completion. An example is below.
226+
6+0 records in
227+
16+0 records out
228+
8192 bytes (8.2 kB, 8.0 KiB) copied, 0.00057009 s, 14.4 MB/s
229+
The first two lines are the 'volume' stats and the final line is
230+
the 'performance' stats.
231+
The volume stats indicate the number of complete and partial
232+
ibs-sized reads, or obs-sized writes that took place during the
233+
copy. The format of the volume stats is
234+
&lt;complete&gt;+&lt;partial&gt;. If records have been truncated (see
235+
conv=block), the volume stats will contain the number of
236+
truncated records.
237+
238+
Possible LEVEL values are:
239+
progress: Print periodic performance stats as the copy
240+
proceeds.
241+
noxfer: Print final volume stats, but not performance stats.
242+
none: Do not print any stats.
243+
244+
Printing performance stats is also triggered by the INFO signal
245+
(where supported), or the USR1 signal. Setting the
246+
POSIXLY_CORRECT environment variable to any value (including an
247+
empty value) will cause the USR1 signal to be ignored.
248+
</code></pre>
249+
<p>CONVERSION OPTIONS:</p>
250+
<pre><code>ascii convert from EBCDIC to ASCII. This is the inverse of the 'ebcdic'
251+
option. Implies conv=unblock.
252+
ebcdic convert from ASCII to EBCDIC. This is the inverse of the 'ascii'
253+
option. Implies conv=block.
254+
ibm convert from ASCII to EBCDIC, applying the conventions for '[', ']'
255+
and '~' specified in POSIX. Implies conv=block.
256+
257+
ucase convert from lower-case to upper-case
258+
lcase converts from upper-case to lower-case.
259+
260+
block for each newline less than the size indicated by cbs=BYTES, remove
261+
the newline and pad with spaces up to cbs. Lines longer than cbs are
262+
truncated.
263+
unblock for each block of input of the size indicated by cbs=BYTES, remove
264+
right-trailing spaces and replace with a newline character.
265+
266+
sparse attempts to seek the output when an obs-sized block consists of only
267+
zeros.
268+
swab swaps each adjacent pair of bytes. If an odd number of bytes is
269+
present, the final byte is omitted.
270+
sync pad each ibs-sided block with zeros. If 'block' or 'unblock' is
271+
specified, pad with spaces instead.
272+
excl the output file must be created. Fail if the output file is already
273+
present.
274+
nocreat the output file will not be created. Fail if the output file in not
275+
already present.
276+
notrunc the output file will not be truncated. If this option is not
277+
present, output will be truncated when opened.
278+
noerror all read errors will be ignored. If this option is not present, dd
279+
will only ignore Error::Interrupted.
280+
fdatasync data will be written before finishing.
281+
fsync data and metadata will be written before finishing.
282+
</code></pre>
283+
<p>INPUT FLAGS:</p>
284+
<pre><code>count_bytes a value to count=N will be interpreted as bytes.
285+
skip_bytes a value to skip=N will be interpreted as bytes.
286+
fullblock wait for ibs bytes from each read. zero-length reads are still
287+
considered EOF.
288+
</code></pre>
289+
<p>OUTPUT FLAGS:</p>
290+
<pre><code>append open file in append mode. Consider setting conv=notrunc as well.
291+
seek_bytes a value to seek=N will be interpreted as bytes.
292+
</code></pre>
293+
<p>GENERAL FLAGS:</p>
294+
<pre><code>direct use direct I/O for data.
295+
directory fail unless the given input (if used as an iflag) or output (if used
296+
as an oflag) is a directory.
297+
dsync use synchronized I/O for data.
298+
sync use synchronized I/O for data and metadata.
299+
nonblock use non-blocking I/O.
300+
noatime do not update access time.
301+
nocache request that OS drop cache.
302+
noctty do not assign a controlling tty.
303+
nofollow do not follow system links.
304+
</code></pre>
195305
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
196306
<p>Make a bootable USB drive from an isohybrid file (such like <code>archlinux-xxx.iso</code>) and show the progress:</p>
197307
<pre><code class="language-shell">dd if={{file.iso}} of=/dev/{{usb_drive}} status=progress

user/utils/df.html

+6
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,12 @@ <h2 id="options"><a class="header" href="#options">Options</a></h2>
253253
<p>Print version information</p>
254254
</dd>
255255
</dl>
256+
<p>Display values are in units of the first available SIZE from --block-size,
257+
and the DF_BLOCK_SIZE, BLOCK_SIZE and BLOCKSIZE environment variables.
258+
Otherwise, units default to 1024 bytes (or 512 if POSIXLY_CORRECT is set).</p>
259+
<p>SIZE is an integer and optional unit (example: 10M is 10<em>1024</em>1024).
260+
Units are K, M, G, T, P, E, Z, Y (powers of 1024) or KB, MB,... (powers
261+
of 1000).</p>
256262
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
257263
<p>Display all filesystems and their disk usage:</p>
258264
<pre><code class="language-shell">df

user/utils/dir.html

+1
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,7 @@ <h2 id="options"><a class="header" href="#options">Options</a></h2>
416416
<p>Print version information</p>
417417
</dd>
418418
</dl>
419+
<p>The TIME_STYLE argument can be full-iso, long-iso, iso, locale or +FORMAT. FORMAT is interpreted like in date. Also the TIME_STYLE environment variable sets the default style to use.</p>
419420
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
420421
<p>List all files, including hidden files:</p>
421422
<pre><code class="language-shell">dir -all

user/utils/dircolors.html

+3
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,9 @@ <h2 id="options"><a class="header" href="#options">Options</a></h2>
208208
<p>Print version information</p>
209209
</dd>
210210
</dl>
211+
<p>If FILE is specified, read it to determine which colors to use for which
212+
file types and extensions. Otherwise, a precompiled database is used.
213+
For details on the format of these files, run 'dircolors --print-database'</p>
211214
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
212215
<p>Output commands to set LS_COLOR using default colors:</p>
213216
<pre><code class="language-shell">dircolors

user/utils/du.html

+13
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,19 @@ <h2 id="options"><a class="header" href="#options">Options</a></h2>
285285
<p>Print version information</p>
286286
</dd>
287287
</dl>
288+
<p>Display values are in units of the first available SIZE from --block-size,
289+
and the DU_BLOCK_SIZE, BLOCK_SIZE and BLOCKSIZE environment variables.
290+
Otherwise, units default to 1024 bytes (or 512 if POSIXLY_CORRECT is set).</p>
291+
<p>SIZE is an integer and optional unit (example: 10M is 10<em>1024</em>1024).
292+
Units are K, M, G, T, P, E, Z, Y (powers of 1024) or KB, MB,... (powers
293+
of 1000).</p>
294+
<p>PATTERN allows some advanced exclusions. For example, the following syntaxes
295+
are supported:
296+
? will match only one character</p>
297+
<ul>
298+
<li>will match zero or more characters
299+
{a,b} will match a or b</li>
300+
</ul>
288301
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
289302
<p>List the sizes of a directory and any subdirectories, in the given unit (B/KiB/MiB):</p>
290303
<pre><code class="language-shell">du -{{b|k|m}} {{path/to/directory}}

user/utils/echo.html

+14
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,20 @@ <h2 id="options"><a class="header" href="#options">Options</a></h2>
204204
<p>Print version information</p>
205205
</dd>
206206
</dl>
207+
<p>Echo the STRING(s) to standard output.</p>
208+
<p>If -e is in effect, the following sequences are recognized:</p>
209+
<p>\\ backslash
210+
\a alert (BEL)
211+
\b backspace
212+
\c produce no further output
213+
\e escape
214+
\f form feed
215+
\n new line
216+
\r carriage return
217+
\t horizontal tab
218+
\v vertical tab
219+
\0NNN byte with octal value NNN (1 to 3 digits)
220+
\xHH byte with hexadecimal value HH (1 to 2 digits)</p>
207221
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
208222
<p>Print a text message. Note: quotes are optional:</p>
209223
<pre><code class="language-shell">echo &quot;{{Hello World}}&quot;

user/utils/env.html

+1
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ <h2 id="options"><a class="header" href="#options">Options</a></h2>
212212
<p>Print version information</p>
213213
</dd>
214214
</dl>
215+
<p>A mere - implies -i. If no COMMAND, print the resulting environment.</p>
215216
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
216217
<p>Show the environment:</p>
217218
<pre><code class="language-shell">env

user/utils/expr.html

+46-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ <h1 id="expr"><a class="header" href="#expr">expr</a></h1>
179179
<pre><code>expr [EXPRESSION]
180180
expr [OPTIONS]
181181
</code></pre>
182-
<p>Print the value of EXPRESSION to standard output</p>
182+
<p>Print the value of <code>EXPRESSION</code> to standard output</p>
183183
<h2 id="options"><a class="header" href="#options">Options</a></h2>
184184
<dl><dt><code>--version</code></dt>
185185
<dd>
@@ -193,6 +193,51 @@ <h2 id="options"><a class="header" href="#options">Options</a></h2>
193193
<dd>
194194
</dd>
195195
</dl>
196+
<p>Print the value of <code>EXPRESSION</code> to standard output. A blank line below
197+
separates increasing precedence groups. </p>
198+
<p><code>EXPRESSION</code> may be:</p>
199+
<pre><code>ARG1 | ARG2 ARG1 if it is neither null nor 0, otherwise ARG2
200+
201+
ARG1 &amp; ARG2 ARG1 if neither argument is null or 0, otherwise 0
202+
203+
ARG1 &lt; ARG2 ARG1 is less than ARG2
204+
ARG1 &lt;= ARG2 ARG1 is less than or equal to ARG2
205+
ARG1 = ARG2 ARG1 is equal to ARG2
206+
ARG1 != ARG2 ARG1 is unequal to ARG2
207+
ARG1 &gt;= ARG2 ARG1 is greater than or equal to ARG2
208+
ARG1 &gt; ARG2 ARG1 is greater than ARG2
209+
210+
ARG1 + ARG2 arithmetic sum of ARG1 and ARG2
211+
ARG1 - ARG2 arithmetic difference of ARG1 and ARG2
212+
213+
ARG1 * ARG2 arithmetic product of ARG1 and ARG2
214+
ARG1 / ARG2 arithmetic quotient of ARG1 divided by ARG2
215+
ARG1 % ARG2 arithmetic remainder of ARG1 divided by ARG2
216+
217+
STRING : REGEXP anchored pattern match of REGEXP in STRING
218+
219+
match STRING REGEXP same as STRING : REGEXP
220+
substr STRING POS LENGTH substring of STRING, POS counted from 1
221+
index STRING CHARS index in STRING where any CHARS is found, or 0
222+
length STRING length of STRING
223+
+ TOKEN interpret TOKEN as a string, even if it is a
224+
keyword like 'match' or an operator like '/'
225+
226+
( EXPRESSION ) value of EXPRESSION
227+
</code></pre>
228+
<p>Beware that many operators need to be escaped or quoted for shells.
229+
Comparisons are arithmetic if both ARGs are numbers, else lexicographical.
230+
Pattern matches return the string matched between ( and ) or null; if
231+
( and ) are not used, they return the number of characters matched or 0.</p>
232+
<p>Exit status is <code>0</code> if <code>EXPRESSION</code> is neither null nor <code>0</code>, <code>1</code> if <code>EXPRESSION</code> is null
233+
or <code>0</code>, <code>2</code> if <code>EXPRESSION</code> is syntactically invalid, and <code>3</code> if an error occurred.</p>
234+
<p>Environment variables:</p>
235+
<ul>
236+
<li><code>EXPR_DEBUG_TOKENS=1</code>: dump expression's tokens</li>
237+
<li><code>EXPR_DEBUG_RPN=1</code>: dump expression represented in reverse polish notation</li>
238+
<li><code>EXPR_DEBUG_SYA_STEP=1</code>: dump each parser step</li>
239+
<li><code>EXPR_DEBUG_AST=1</code>: dump expression represented abstract syntax tree</li>
240+
</ul>
196241
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
197242
<p>Get string length:</p>
198243
<pre><code class="language-shell">expr length {{string}}

user/utils/ls.html

+1
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,7 @@ <h2 id="options"><a class="header" href="#options">Options</a></h2>
416416
<p>Print version information</p>
417417
</dd>
418418
</dl>
419+
<p>The TIME_STYLE argument can be full-iso, long-iso, iso, locale or +FORMAT. FORMAT is interpreted like in date. Also the TIME_STYLE environment variable sets the default style to use.</p>
419420
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
420421
<p>List files one per line:</p>
421422
<pre><code class="language-shell">ls -1

user/utils/mknod.html

+14
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,20 @@ <h2 id="options"><a class="header" href="#options">Options</a></h2>
208208
<p>Print version information</p>
209209
</dd>
210210
</dl>
211+
<p>Mandatory arguments to long options are mandatory for short options too.
212+
-m, --mode=MODE set file permission bits to MODE, not a=rw - umask
213+
--help display this help and exit
214+
--version output version information and exit</p>
215+
<p>Both MAJOR and MINOR must be specified when TYPE is b, c, or u, and they
216+
must be omitted when TYPE is p. If MAJOR or MINOR begins with 0x or 0X,
217+
it is interpreted as hexadecimal; otherwise, if it begins with 0, as octal;
218+
otherwise, as decimal. TYPE may be:</p>
219+
<p>b create a block (buffered) special file
220+
c, u create a character (unbuffered) special file
221+
p create a FIFO</p>
222+
<p>NOTE: your shell may have its own version of mknod, which usually supersedes
223+
the version described here. Please refer to your shell's documentation
224+
for details about the options it supports.</p>
211225
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
212226
<p>Create a block device:</p>
213227
<pre><code class="language-shell">sudo mknod {{path/to/device_file}} b {{major_device_number}} {{minor_device_number}}

0 commit comments

Comments
 (0)