I came across using the find command in the example as follows (it copies the directory structure somewhere)
find olddir -name script.sh -printf "%p\0" -printf "newdir/%P\0" | xargs -0L2 cp -n
I donβt understand the difference between% p and% P. I read the search man page, which doesnβt say much.
%p File name. %P File name with the name of the command line argument under which it was found removed.
what is the difference between% p and% P
I am confused by what this means
%P File name with the name of the command line argument under which it was found removed.
source share