Change the implementation of `rm -r` so that it is explicitly recursive
so that (1) there is one code path regardless of whether `--verbose` is
given and (2) it is easier to be compatible with GNU `rm`.
This change eliminates a dependency on the `walkdir` crate.
Fixes#7033, fixes#7305, fixes#7307.
Avoid an extremely long format width specifier in test case
`test_long_lines`. The Rust compiler is planning an upcoming change to
restrict the maximum width that can be specified to 65535, so this
change defends against future limitations in the compiler. For more
information, see
<https://github.com/uutils/coreutils/pull/7128#discussion_r1955787665>.
* cp: fix verbose output order after prompt
Fixes: #7285
* cp: add test for verbose message order
* cp: fix test for interactive prompt ordering
* cp: update test for verbose output order
* cp: fix test cases to use update option
Avoid a panic that would occur when attempting to remove a file that
didn't exist. This would happen when scanning for a regular expression
match, advancing by a positive offset, and suppressing empty files. For
example, before this commit,
echo a | csplit -z - %a%1
would cause a panic. After this commit, the process terminates as
expected: without error, without output, and without any files written.
Fixes#7251.
Support obsolete form of timestamp argument for old POSIX versions. In
summary, when older versions of POSIX are used and the first positional
argument looks like a date and time, then treat it as a timestamp
instead of as a filename. For example, before this commit
_POSIX2_VERSION=199209
POSIXLY_CORRECT=1
touch 01010000 11111111
would create two files, `01010000` and `11111111`. After this commit,
the first argument is interpreted as a date and time (in this case,
midnight on January 1 of the current year) and that date and time are
set on the file named `11111111`.
Fixes#7180.
* head: fix bug reading back through files
Fix issue #7247.
Rework logic for reading/seeking backwards through files.
Bug was seen when reading back through large files.
Added test case to validate fix.
Change `printf` to correctly terminate with an error message when an
escape sequence starts with `\x` but doesn't include a literal
hexadecimal value after. For example, before this commit,
printf '\x'
would output `\x`, but after this commit, it terminates with an error
message,
printf: missing hexadecimal number in escape
Fixes#7097
* kill: check the lower 5 bits when the input is a number
* test/kill: added testcase
* kill: check the last 7 bits
* kill: check only the last 8 bits and the signals in the range [128, 159]
---------
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>