mirror of
https://github.com/uutils/findutils.git
synced 2026-06-10 15:48:30 -07:00
53980035affc85e7562d55188088b492592e37eb
`\NNN` octal escapes were parsed by slicing a fixed 3 bytes off the format string, which panics when fewer than 3 octal digits are followed by a multibyte character (e.g. `-printf '\0€'`): the 3-byte slice lands inside the multibyte char and trips a char-boundary assertion. Parse the octal escape from the leading octal digits only (1 to 3, all ASCII) and advance by their byte length. This also fixes `\1`..`\7`, which previously fell through to the single-character escape table and errored instead of being treated as octal, matching GNU find.
findutils
Rust implementation of GNU findutils: xargs, find, locate and updatedb.
The goal is to be a full drop-in replacement of the original commands.
Run the GNU testsuite on rust/findutils:
bash util/build-gnu.sh
# To run a specific test:
bash util/build-gnu.sh tests/misc/help-version.sh
Comparing with GNU
Build/run with BFS
bfs is a variant of the UNIX find command that operates breadth-first rather than depth-first.
bash util/build-bfs.sh
# To run a specific test:
bash util/build-bfs.sh posix/basic
For more details, see https://github.com/uutils/findutils-tracking/
Description
Languages
Rust
98.7%
Shell
1%
Python
0.3%