I think I misled on "*except while processing the command line argument*" for the -H option, wich is for find and not for exec command :-( after some internet research, I tried this :
find . -type l -exec sh -c "md5sum \$( readlink {} )" \; d41d8cd98f00b204e9800998ecf8427e a and it seems ok for me :-) regards 2016-07-23 9:57 GMT+02:00 Pascal <patate...@gmail.com>: > hi, > > if I understand the man of find : > > > > > > > > > > > > > > > * -H Do not follow symbolic links, except while processing the > com‐ mand line arguments. When find examines or prints > information about files, the information used shall be taken > from the prop‐ erties of the symbolic link itself. The only > exception to this behaviour is when a file specified on the > command line is a sym‐ bolic link, and the link can be > resolved. For that situation, the information used is > taken from whatever the link points to (that is, the link is > followed). The information about the link itself is used as > a fallback if the file pointed to by the sym‐ bolic link > cannot be examined. If -H is in effect and one of the > paths specified on the command line is a symbolic link to a > directory, the contents of that directory will be > examined (though of course -maxdepth 0 would prevent this).* > exec command should be played on "./a" and not "./b" ? > > 2016-07-22 20:40 GMT+02:00 Dale R. Worley <wor...@alum.mit.edu>: > >> Pascal <patate...@gmail.com> writes: >> > how find links and exec command on pointed files ? >> > >> > $ touch a >> > $ ln -s a b >> > $ ll >> > a >> > b -> a >> > $ find -H . -type l -exec md5sum '{}' \; >> > d41d8cd98f00b204e9800998ecf8427e ./b >> > >> > md5sum is running on "./b" and not on "./a" like excepted :-( >> >> But that is the behavior expected running md5sum on "./b"! >> >> $ touch a >> $ ln -s a b >> $ ll >> total 248 >> drwxr-xr-x. 2 worley worley 4096 Jul 22 14:37 . >> drwxr-xr-x. 53 worley worley 245760 Jul 22 14:37 .. >> -rw-r--r--. 1 worley worley 0 Jul 22 14:37 a >> lrwxrwxrwx. 1 worley worley 1 Jul 22 14:37 b -> a >> $ find -H . -type l -exec md5sum '{}' \; >> d41d8cd98f00b204e9800998ecf8427e ./b >> $ find -H . -type l -exec echo md5sum '{}' \; >> md5sum ./b >> $ md5sum ./b >> d41d8cd98f00b204e9800998ecf8427e ./b >> $ >> >> Dale >> > >