On 2022-10-28 at 06:14, Mario Marietto wrote: > Hello. Both these commands : > > # find . -print -depth | cpio --create --format='newc' > ../../i > nitrd.img-5.19.0-15.2-liquorix-amd64 > > # find . | cpio --create --format='newc' > ../../initrd.img-5.10.0-18-amd64 > > produce this warning : > > find: warning: you have specified the global option -depth after the > argument -print, but global options are not positional, i.e., -depth > affects tests specified before it as well as those specified after it. > Please specify global options before other arguments. > > It is a warning,not an error. But why does it happens ? Can I "fx" it ?
The message already tells you why it happens: it happens because you specified the options to 'find' in an order which a user might interpret as doing something different from what it will actually do. (This matters primarily with more-complicated 'find' commands, but they still show the warning even with this simpler version.) You can 'fix' it by putting the arguments to 'find' in a different order: # find . -depth -print | [...] Which translates to "find in this location, depth-first, and print the results". (Please don't top-post. I don't expect you to actually adhere to that, but it's a faint hope, and I'm unlikely to actually participate in the thread any further anyway...) -- The Wanderer The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. -- George Bernard Shaw
signature.asc
Description: OpenPGP digital signature