aboutsummaryrefslogtreecommitdiffstats
path: root/doc (follow)
AgeCommit message (Collapse)AuthorFilesLines
2025-11-07doc: cksum: clarify support of --text and --binaryPádraig Brady1-3/+7
Make the documentation more accurate following v9.3-80-g5e1e0993b * doc/coreutils.texi (cksum common options): State that --text and --binary are actually supported, but only to support emulation of the legacy utils.
2025-11-05doc: mention nanosecond decimal points with --iso-8601=nsCollin Funk1-0/+5
Many people are used to seeing ISO 8601 dates using a period separating seconds and nanoseconds. This behavior seems to be worth documenting given the bug reports: https://bugs.gnu.org/63119 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1118970 * doc/coreutils.texi (Options for date): Mention that 'date --iso-8601=ns' uses a comma as a separator, following the preference of ISO 8601. Give an example of how to get an ISO 8601 date with a period separator.
2025-10-25sort: use the more efficient posix_spawn to invoke --compress-programCollin Funk1-0/+4
* NEWS: Mention the improvement. Mention that 'sort' will continue without compressing temporary files if the program specified by --compress-program cannot be executed. * doc/coreutils.texi (sort invocation): Document the behavior when the program specified by --compress-program cannot be executed. * src/sort.c: Include spawn.h. (MAX_FORK_TRIES_COMPRESS, MAX_FORK_TRIES_DECOMPRESS): Remove definition. (MAX_TRIES_COMPRESS, MAX_TRIES_DECOMPRESS): New definitions based on MAX_FORK_TRIES_COMPRESS and MAX_FORK_TRIES_DECOMPRESS. (async_safe_die): Remove function. (posix_spawn_file_actions_move_fd): New function. (pipe_fork): Remove function. (pipe_child): New function based on pipe_fork. Return an error number instead of a pid. Use posix_spawnp instead of calling fork and expecting the caller to exec. (maybe_create_temp): Call pipe_child instead of pipe_fork. Print a warning to standard error if --compress-program cannot be executed and the error is different than the previous call. Remove code for the child process. (open_temp): Remove code for the child process. Improve error message. * tests/sort/sort-compress.sh: Add a test case for when the program specified by --compress-program does not exist.
2025-10-17numfmt: add --unit-separatorPádraig Brady1-0/+17
Output, accept, or disallow a string between the number and unit as recommended in <https://physics.nist.gov/cuu/Units/checklist.html> I.e. support outputting numbers of the form: "1234 M" * src/numfmt.c (simple_strtod_human): Skip unit separator if present, or disallow a unit separator if empty. (double_to_human): Output unit separator if specified. (main): Accept --unit-separator. * tests/misc/numfmt.pl: Add test cases. * doc/coreutils.texi: Describe the new option, giving examples of interaction with --delimiter. * NEWS: Mention the new feature. * THANKS.in: Add Johannes Schauer Marin Rodrigues, who provided a preliminary patch.
2025-10-17numfmt: support reading numbers with NBSP before unitPádraig Brady1-1/+1
* src/numfmt.c (simple_strtod_human): Accept (multi-byte) non-breaking space character between number and unit. Note we restrict this to a single character between number and unit, to allow less ambiguous parsing if multiple blanks are used to delimit fields. * tests/misc/numfmt.pl: Add test cases. * doc/coreutils.texi (numfmt invocation): Fix stale description --delimiter skipping whitespace. * NEWS: Mention the improvement.
2025-09-23doc: document gl_cv_crc_pclmul to control hardware accelerationPádraig Brady1-3/+4
doc/coreutils.texi (Harware acceleration configuration): Sort the list and add "gl_cv_crc_pclmul".
2025-09-20doc: don't capitalize the first letter of cgroupCollin Funk1-2/+2
This is the correct way to write it as described in the documentation: <https://docs.kernel.org/admin-guide/cgroup-v2.html#terminology>. * doc/coreutils.texi (nproc invocation): Use cgroup instead of Cgroup.
2025-09-17doc: add hardware acceleration configuration docsPádraig Brady1-0/+65
* NEWS: Mention the new GLIBC_TUNABLES feature. * doc/coreutils.texi (Hardware Acceleration): A new node detailing the build time and run time configuration options.
2025-09-04doc: update the md5/sha1 "weak hash" advisoryPádraig Brady1-2/+3
* doc/coreutils.texi: Adjust advisory for md5sum and sha1sum to include "sha3", and also the more general `cksum -a` interface.
2025-09-04cksum: prefer -a sha2 -l ###, to -a sha###Pádraig Brady1-7/+4
To make the interface more concise and consistent, while being backwards compatible. * src/digest.c (main): Continue to support -a "sha###" but also support -a "sha2" and treat it like "sha3", except in... (output_file): ... maintain the legacy tags for better compatability. * doc/coreutils.texi (cksum invocation): Document the -a sha2 option. * tests/cksum/cksum-base64.pl: Adjust as per modified --help. * tests/cksum/cksum-c.sh: Add new supported SHA2-### tagged variant. * NEWS: Mention the new feature.
2025-09-03cksum: add support for SHA-3Collin Funk1-7/+21
* src/digest.c: Include sha3.h. (BLAKE2B_MAX_LEN): Rename to DIGEST_MAX_LEN since it is also used for SHA-3. (sha3_sum_stream): New function. (enum Algorithm, algorithm_args, algorithm_args, algorithm_types) algorithm_tags, algorithm_bits, cksumfns, cksum_output_fns): Add entries for SHA-3. (usage): Mention that SHA-3 is supported. Mention requirements for --length with SHA-3. (split_3): Use DIGEST_MAX_LEN instead of BLAKE2B_MAX_LEN. Determine the length of the digest for SHA-3. Make sure it is 224, 256, 384, or 512. (digest_file): Set the digest length in bytes. Use DIGEST_MAX_LEN instead of BLAKE2B_MAX_LEN. Always append the digest length to SHA3 in the output. (main): Allow the use of --length with 'cksum -a sha3'. Use DIGEST_MAX_LEN instead of BLAKE2B_MAX_LEN. Make sure it is 224, 256, 384, or 512. * tests/cksum/cksum-base64.pl (@pairs): Add expected sha3 output. (fmt): Modify the output to use SHA3-512 since that is the default. (@Tests): Modify arguments for sha3 to use --length=512. * tests/cksum/cksum-sha3.sh: New test, based on tests/cksum/b2sum.sh. * tests/local.mk (all_tests): Add the test. * bootstrap.conf: Add crypto/sha3. * gnulib: Update to latest commit. * NEWS: Mention the change. * doc/coreutils.texi (cksum general options): Mention sha3 as a supported argument to the -a option. Mention that 'cksum -a sha3' supports the --length option. Mention that SHA-3 is considered secure.
2025-08-22fold: add the --characters optionCollin Funk1-0/+7
* src/fold.c: Include mcel.h. (count_bytes): Remove variable. (counting_mode, last_character_width): New variables. (shortopts, long_options): Add the option. (adjust_column): If --characters is in used account for number of characters instead of their width. (fold_file): Use getline and iterate over the result with mcel functions to handle multibyte characters. (main): Check for the option. * src/local.mk (src_fold_LDADD): Add $(LIBC32CONV), $(LIBUNISTRING), and $(MBRTOWC_LIB). * tests/fold/fold-characters.sh: New file. * tests/fold/fold-spaces.sh: New file. * tests/fold/fold-nbsp.sh: New file. * tests/local.mk (all_tests): Add the tests. * NEWS: Mention the new option. * doc/coreutils.texi (fold invocation): Likewise.
2025-08-19maint: prefer https to httpCollin Funk1-1/+1
* doc/sort-version.texi (Other version/natural sort implementations): Use https in documentation link. * tests/chmod/symlinks.sh: Use https in license text.
2025-08-19nproc: honor cgroup v2 CPU quotasPádraig Brady1-4/+5
* NEWS: Mention the new feature. * doc/coreutils.texi (nproc invocation): Mention that cgroup CPU quotas can limit the reported number. * gnulib: Update to new nproc gnulib implementation: https://github.com/coreutils/gnulib/commit/9b07115f4a
2025-08-14realpath: improve doc and NEWSPaul Eggert1-20/+23
2025-08-14tsort: add do-nothing -w optionPaul Eggert1-2/+3
This is for conformance to POSIX.1-2024 * src/tsort.c: Include getopt.h. (main): Accept and ignore -w. Do not bother altering the usage message, as the option is useless. * tests/misc/tsort.pl (cycle-3): New test.
2025-08-10realpath: support the -E option required by POSIXCollin Funk1-2/+12
* src/realpath.c (longopts): Add the option. (main): Likewise. (usage): Add the option to the --help message. * tests/misc/realpath.sh: Add a simple test. * doc/coreutils.texi (realpath invocation): Mention the new option. * NEWS: Likewise.
2025-08-10doc: --base58: add example usage to infoPádraig Brady1-0/+4
* doc/coreutils.texi (basenc invocation): Add an example using --base58 to generate a unique ID. This also demonstrates compound usage of the basenc command, to convert to/from binary.
2025-08-09basenc: add base58 supportPádraig Brady1-0/+9
A 58 character encoding that: - avoids visually ambiguous 0OIl characters - uses only alphanumeric characters Described at: - https://tools.ietf.org/html/draft-msporny-base58-03 This implementation uses GMP (or gnulib's gmp fallback). Performance is good in comparison to other implementations. For example when using libgmp on an i7-5600U system, encoding is 530 times faster, and decoding 830 times faster than the implementation using arbitrary precision ints in cpython 3.13. Memory use is proportional to the size of input. Encoding benchmarks: $ time yes | head -c65535 | src/basenc --base58 -w0 >file.enc real 0m0.018s ./configure --quiet --without-libgmp && make -j $(nproc) $ time yes | head -c65535 | src/basenc --base58 -w0 >file.enc real 0m3.431s # dnf install python3-base58 $ time yes | head -c65535 | base58 >file.enc # cpython 3.13 real 0m9.700s Decoding benchmarks: $ time src/basenc --base58 -d <file.enc >/dev/null real 0m0.010s $ ./configure --without-libgmp && make # gnulib gmp $ time src/basenc --base58 -d <file.enc >/dev/null real 0m0.145s $ time base58 -d <file.enc >/dev/null # cpython 3.13 real 0m8.302s * src/basenc.c (base_decode_ctx_finalize, base_encode_ctx_init, base_encode_ctx, base_encode_ctx_finalize): New functions to provide more general processing functionality. (base58_{de,en}code_ctx{_init,,_finalize}): New functions to accumulate all input before calling ... (base58_{de,en}code): ... the GMP based encoding/decoding routines. (do_encode, do_decode): Call the ctx variants if enabled. * doc/coreutils.texi (basenc invocation): Describe the new option, and indicate the main use case being interactive user use. * src/local.mk: Link basenc with GMP. * tests/basenc/basenc.pl: Add test cases. * NEWS: Mention the new feature.
2025-08-03tail: fix unlikely races with >=2 --pidsPaul Eggert1-2/+2
Also, fix commentary to talk about “nonexistent” rather than “dead” processes, since the code looks for the former not the latter and the difference matters for zombies. * src/tail.c (some_writers_exist): Rename from writers_are_dead, negate the sense, don’t have a special and counterintuitive case for !nbpids, remove PIDs found not to exist, and avoid some though not all unlikely races when kernels reuse PIDs. (tail_forever): Optimize via blocking I/O even if --pid was used, so long as all the writers no longer exist. (tail_forever, tail_forever_inotify): Simplify the writers_dead logic; there is no need to have a local var to track this, since we can use pids and nbpids now. (parse_options): Also free and clear pids if !forever.
2025-08-03tail: prefer intmax_t to uintmax_tPaul Eggert1-1/+2
Signed types let us debug better, by using -fsanitize=undefined. * doc/local.mk (doc/constants.texi): Adjust change from macro to enum. * src/tail.c (COPY_TO_EOF, COPY_A_BUFFER) (DEFAULT_MAX_N_UNCHANGED_STATS_BETWEEN_OPENS): Now enum constants, not macros. (COPY_TO_EOF, COPY_A_BUFFER): Now negative, not positive. (count_t): New typedef. Use it instead of uintmax_t. (COUNT_MAX): New macro; use it instead of UINTMAX_MAX. (struct File_spec, max_n_unchanged_stats_between_opens) (dump_remainder, file_lines, pipe_lines, pipe_bytes) (start_bytes, start_lines, tail_forever, check_fspec) (tail_forever_inotify, tail_bytes, tail_lines, tail, tail_file) (parse_obsolete_option, parse_options, main): Prefer count_t to uintmax_t.
2025-08-03readlink: improve documentation for POSIXLY_CORRECT in --helpCollin Funk1-1/+5
* NEWS: Improve wording to not imply POSIXLY_CORRECT=1 readlink -q will be verbose. * src/readlink.c (usage): Mention the affect of POSIXLY_CORRECT on -s (--silent), -q (--quiet), and -v (--verbose) in the help message. (main): Remove spurious newline added by previous commit. * doc/coreutils.texi (readlink invocation): Mention that -s (--silent) and -q (--quiet) are not the default when POSIXLY_CORRECT is set.
2025-08-03readlink: emit errors when POSIXLY_CORRECT is setCollin Funk1-0/+4
* src/readlink.c (main): Set verbose if the POSIXLY_CORRECT environment variable is set. * tests/readlink/readlink-posix.sh: New file. * tests/local.mk (all_tests): Add it. * NEWS: Mention the change. * doc/coreutils.texi (readlink invocation): Document the behavior of POSIXLY_CORRECT.
2025-07-29doc: use consistent references to standard filesPádraig Brady1-4/+9
* cfg.mk (sc_standard_outputs): A new syntax check to enforce standard references. * doc/coreutils.texi: s/stderr/standard error/ etc. * src/date.c: Likewise. * src/dd.c: Likewise. * src/env.c: Likewise. * src/sort.c: Likewise. * src/split.c: Likewise. * src/stty.c: Likewise. * src/timeout.c: Likewise. * src/who.c: Likewise.
2025-07-21date: update documentation regarding non-Gregorian calendarsBruno Haible1-0/+86
* doc/coreutils.texi (Calendars): New section.
2025-07-09doc: update ‘factor’ benchmarksPaul Eggert1-6/+6
2025-07-09factor: don’t prove primalityPaul Eggert1-4/+14
Suggested for consideration by Torbjörn Granlund in: https://lists.gnu.org/r/coreutils/2025-01/msg00000.html * src/factor.c (PROVE_PRIMALITY): Now defaults to false. (mp_prime_p): Help the compiler by telling it mpz_prob_prime_p returns nonnegative. * tests/factor/create-test.sh (bigprime): Test 2^400 - 593, since that’s now practical. * tests/local.mk (factor_tests): Add new test.
2025-07-05doc: fix a dead linkCollin Funk1-1/+1
* doc/coreutils.texi (Block Size): Use an updated link to SI prefixes.
2025-07-02maint: add files generated by 'make ps' to .gitignoreCollin Funk1-0/+2
* doc/.gitignore (/coreutils.ps, /coreutils.t2d/): Add entries.
2025-07-02doc: remove outdated TODO/FIXME itemsCollin Funk1-4/+0
* TODO: Remove note about missing documentation for 'pinky' and '['. * doc/coreutils.texi: Likewise.
2025-07-01doc: remove extraneous double quotes within @samp{}Pádraig Brady1-3/+3
* doc/coreutils.texi (df invocation): @samp{} items are suitably quoted already.
2025-06-30doc: use ``...'' instead of "..."Collin Funk1-7/+7
* doc/coreutils.texi (split invocation): Use ``...'' for quoting text. (cksum common options): Likewise. (Control): Likewise.
2025-06-27doc: list signals added by POSIX.1-2024Collin Funk1-0/+9
* doc/coreutils.texi (Signal specifications): Mention that POSIX.1-2024 added SIGWINCH.
2025-06-27doc: mention that POSIX.1-2024 added dd iflag=fullblockCollin Funk1-1/+2
* doc/coreutils.texi (dd invocation): Document that POSIX.1-2024 added iflag=fullblock.
2025-06-27doc: cksum: --check: improve supported formats descriptionPádraig Brady1-8/+10
* doc/coreutils.texi (cksum common options): Reorder and tweak the info to make it clearer that --check does not support the legacy crc output from the cksum command. Reported at https://bugs.debian.org/1108363
2025-06-24od: fix various off-by-one issues with --strings with -NPádraig Brady1-0/+2
* src/od.c (dump_strings): There are three related issues here due to not accounting for the terminating NUL char appropriately. 1. Ensure BUF always has enough space for the terminating NUL. This avoids CWE-122: Heap-based Buffer Overflow, where we wrote a single NUL byte directly after the allocated buffer. I.e., there should be no buffer overflow with: printf '%100s' | od -N100 -S1 2. Ensure we support -S == -N (END_OFFSET - STRING_MIN == ADDRESS): I.e., there should be output with: printf '%100s' | od -N10 -S10 3. Ensure we always output a valid address by ensuring the ADDRESS and I variables are kept in sync. I.e., this should output address 0000000 not 1777777777777777777777: printf '%100s' | od -N10 -S1 As well as fixing these we simplify by using a single loop to read the data, rather than two. * doc/coreutils.texi (od invocation): Clarify that -N implicitly NUL terminates strings. * tests/od/od-N.sh: Add test cases. * NEWS: Mention the bug fixes. Fixes https://bugs.gnu.org/78880
2025-06-22doc: stty: adjust description of supported speedsPádraig Brady1-19/+2
* doc/coreutils.texi (stty invocation): Remove now imprecise list of speeds given we may now support higher or arbitrary speeds. Mention that we may support higher or arbitrary speeds.
2025-06-20tty: better fix for Bug#26371Paul Eggert1-0/+1
* src/tty.c (TTY_USAGE): Rename from TTY_FAILURE, since this is used only for usage failures. All uses changed. (TTY_TTYNAME_FAILURE): New constant. (main): Remove no-longer-needed assignment of ENOENT to errno. Make status-setting clearer too. Report an error if ttyname fails even though stdin is a terminal, instead of silently pretending that stdin is not a terminal. * tests/tty/tty.sh: Test for this issue. This should fix Bug#78244.
2025-06-03doc: make command synopsis more consistentPádraig Brady1-8/+7
* doc/coreutils.texi: Use @dots{} after [OPTION], to be consistent with man pages. * src/printenv.c (Usage): Remove unneeded "...". * src/timeout.c (Usage): Add needed "...", and also remove redundant [OPTION] only form. * src/chroot.c (Usage): Likewise. Fixes https://bugs.gnu.org/78628
2025-04-07doc: mention workaround for combining hex floats with suffixesPaul Eggert1-2/+2
* doc/coreutils.texi (hexDuration): Mention the p style exponent trick.
2025-04-06doc: mention the edge case of hex durations with 'd' suffixPádraig Brady1-0/+7
* doc/coreutils.texi (sleep invocation): Mention that suffixes are best avoided with hex arguments. (timeout invocation): Likewise. * tests/misc/sleep.sh: Ensure 'd' is not interpreted as "day".
2025-04-04maint: ensure that new "make syntax-check"-run sc_codespell passesCollin Funk1-1/+1
* cfg.mk (codespell_ignore_words_list): Ignore false-positives. (exclude_file_name_regexp--sc_codespell): Skip some file names. * doc/coreutils.texi (mktemp invocation): Use "alphanumeric" which is consistent with the rest of the documentation. * src/expand-common.c: Fix typo. * src/ls.c: Likewise. * tests/split/l-chunk-root.sh: Likewise.
2025-01-18doc: fix superscript in Texinfo manual's mathG. Branden Robinson1-1/+1
The numeral "3" in the exponent was set at full size on the baseline.
2025-01-10ls: suppress "Permission denied" errors on NFSPádraig Brady1-0/+4
NFS (on Linux 6.12 at least) was seen to return EACCES from listxattr() for files without read access. We started using listxattr() in coreutils 9.4. * src/ls.c (gobble_file): Map EACCES from file_has_aclinfo() to '?', rather than displaying the error. * doc/coreutils.texi (ls invocation): Document the '?' flag. * NEWS: Mention the bug fix. Addresses https://bugs.gnu.org/74692
2025-01-06doc: clarify mv -f operation in texinfoPádraig Brady1-1/+1
* doc/coreutils.texi (mv invocation): Be less ambiguous, in that -f is significant for any replacement operation on the destination, not just unlinking.
2025-01-01maint: update all copyright year number rangesPádraig Brady4-4/+4
Update to latest gnulib with new copyright year. Run "make update-copyright" and then... * gnulib: Update included in this commit as copyright years are the only change from the previous gnulib commit. * tests/init.sh: Sync with gnulib to pick up copyright year. * bootstrap: Likewise. * tests/sample-test: Adjust to use the single most recent year.
2024-12-30date: improve doc for ambiguous formatsPaul Eggert1-3/+8
Problem reported by Tim Connors <https://bugs.gnu.org/75208>. * doc/coreutils.texi (Date conversion specifiers): * src/date.c (usage): Warn about ambiguous formats like %D.
2024-12-23kill: with -l,-t list signal 0Pádraig Brady1-2/+10
The 0 (EXIT) signal is valid as input (and useful to determine existence of a pid), so list it along with other signals. * doc/coreutils.texi (signal specifications): Document 0, "EXIT". * src/kill.c (list_signals): Start loops at 0, not 1. * tests/misc/kill.sh: Add a test case. * NEWS: Mention the change in behavior.
2024-11-02cksum: add support for --algorithm=crc32bPádraig Brady1-3/+5
$ echo -n '123456789' | cksum --raw -a crc32b | basenc --base16 CBF43926 * bootstrap.conf: Explicitly depend on the crc module. * doc/coreutils.texi (cksum): Add "crc32b" as an argument to -a. * src/cksum.c (crc32b_sum_stream): A new function similar to crc_sum_stream, but which does not include the length in the CRC calculation. * src/cksum.h: Add crc32b_sum_stream prototype. * src/digest.c: Add "crc32b" as an argument to -a. * tests/cksum/cksum.sh: Refactor to test both crc and crc32b. * tests/cksum/cksum-a.sh: Add "crc32b" case. * tests/cksum/cksum-base64.pl: Likewise. * tests/misc/read-errors.sh: Likewise. * NEWS: Mention the new feature.
2024-11-02test: add string operators added by POSIX 2024Collin Funk1-1/+11
* src/test.c (binop): Recognize the ">" and "<" operators. (three_arguments): Likewise. (binary_operator): Implement the "<" and ">" operators. (usage): Add operators to --help output. * tests/test/test.pl (@Tests): Add functionality tests. * doc/coreutils.texi (test invocation, String tests): Document new operators. * NEWS: Mention the new feature.