uutils / findutils

Rust implementation of findutils
MIT License
280 stars 35 forks source link

Implement `-files0-from` #378

Open hanbings opened 1 month ago

hanbings commented 1 month ago

refer: https://www.gnu.org/software/findutils/manual/html_node/find_html/Starting-points.html

Option: -files0-from file

Read the starting points from file instead of getting them on the command line. 
In contrast to the known limitations of passing starting points via arguments on the command line, 
namely the limitation of the amount of file names, 
and the inherent ambiguity of file names clashing with option names, 
using this option allows to safely pass an arbitrary number of starting points to find.

Using this option and passing starting points on the command line is mutually exclusive, 
and is therefore not allowed at the same time.

The file argument is mandatory. 
One can use ‘-files0-from -’ to read the list of starting points from the standard input stream, 
and e.g. from a pipe.