4 ms·
The utility 'find' has a nice parameter you can use if you need to parse its output. find ./ -type f -print0 Using the '-print0' option will output a null
by bradleyland 12y ago
The utility 'find' has a nice parameter you can use if you need to parse its output.
find ./ -type f -print0
Using the '-print0' option will output a null terminated list. Since Linux filenames can't contain nulls, you can reliably parse the output.
- ams6110 12y agoIndeed, xargs (often combined with 'find') has a -0 option indicating that the input is null-terminated. So you often see: find ./ -type f -print0 | xargs -0 ...