URL: <https://savannah.gnu.org/bugs/?62561>
Summary: "files0-from" expression prints "find: '\n' No such file or directory " Project: findutils Submitter: zhoushuiqing Submitted: Thu 02 Jun 2022 10:21:25 AM UTC Category: find Severity: 3 - Normal Item Group: Wrong result Status: None Privacy: Public Assigned to: None Originator Name: Originator Email: Open/Closed: Open Release: 4.9.0 Discussion Lock: Any Fixed Release: None _______________________________________________________ Follow-up Comments: ------------------------------------------------------- Date: Thu 02 Jun 2022 10:21:25 AM UTC By: zhoushuiqing <zhoushuiqing> I write some directories into startpoint.txt, and manually add '^@' behind dirs. This symbol means '\0'. Then, run find in command line: [root@fedora /]# ls /home file1 file2 startpoint.txt [root@fedora /]# vim /home/startpoint.txt /home^@ [root@fedora /]# find -files0-from startpoint.txt -name "file*" /home/file1 /home/file2 find: ‘\n’: No such file or directory [root@fedora /]# find --version find (GNU findutils) 4.9.0 Linux: Fedora36 I think '\n' should not be processed, of course, '\n' can be removed. But find can skip the '\n', I think. so I added some code to handle this. Others, I hope to see some examples how to use -files0-from in the manual Let me know your opinions. ;-) _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Thu 02 Jun 2022 10:21:25 AM UTC Name: 0001-handle-newline.patch Size: 799B By: zhoushuiqing <http://savannah.gnu.org/bugs/download.php?file_id=53268> _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?62561> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/