The printf statement :
find directory1 -type d -printf "%P\n" | sort > file1
in the answer https://superuser.com/a/166322/856910 includes a format specifier %P. From the output of this command, I find that it removes the ./ at the beginning of a line: from ./foo to foo. What is the exact meaning of this specifier? I can't find it from man printf.
man find, notman printf" is good, but I think you may have confused threeprintfs, not only two. The title mentions "Bash printf". In Bashprintfis a builtin. See this answer.man bash(orhelp printfin Bash) describes the builtin. The builtin is the onlyprintfI would call "Bash printf". If by "man page" you meantman printf, then it's about anotherprintf, mostly equivalent, still separate. Finally the-printfaction of yourfindis yet another entity. – Kamil Maciorowski Jun 20 '23 at 10:32man find, but somehowman findin your OS describes a different implementation offindthan you actually run. Unlikely, as in this case you would probably write "find printf", not "Bash printf" in the title. Anyway, what man page do you mean exactly? Please [edit] the question and clarify. – Kamil Maciorowski Jun 20 '23 at 10:42man printf, so yes, I am confused by the parameters, thinking that it's the "format specifier" ofprintfinstead of parameter offind. Thanks for the explanation. – Leo Jun 22 '23 at 15:34