Find Parameter Script Help Request

I’ve written a script which will traverse a directory structure and generate directory listing of sorts with an md5sum. Here it is:

It runs great on Red Hat:

find . -printf "%p\\t%s\\t%M\\t%u\\t%g\\t%.24A+\\t%.24T+\\t%.24C+\\t" -a \\( -type d -exec echo \\; -o  -type f -exec sh -c "md5sum {} | cut -d' ' -f1" \\; \\)

here’s one line of output:

./abc/11.5.0/sql/abc13.sql           1607      -rwxr-xr-x            oraapp1               dba        2016-05-10+15:50:04       2002-10-25+16:00:57      2012-06-15+09:34:27     6714d4ba1f7ac762212b882ebdd46312

but … when I run on Suse Enterprise Server 9 (patch level 3) I get:

./abc/11.5.0/sql/abc13.sql           1607      M            oraapp1               dba        A+.   T+.    C+.        6714d4ba1f7ac762212b882ebdd46312

Anyone know how I can make the Suse line look like the RH line?

Thanks

[QUOTE=FlyerFocus;33950]I’ve written a script which will traverse a directory structure and generate directory listing of sorts with an md5sum. Here it is:

It runs great on Red Hat:

find . -printf "%p\\t%s\\t%M\\t%u\\t%g\\t%.24A+\\t%.24T+\\t%.24C+\\t" -a \\( -type d -exec echo \\; -o  -type f -exec sh -c "md5sum {} | cut -d' ' -f1" \\; \\)

here’s one line of output:

./abc/11.5.0/sql/abc13.sql           1607      -rwxr-xr-x            oraapp1               dba        2016-05-10+15:50:04       2002-10-25+16:00:57      2012-06-15+09:34:27     6714d4ba1f7ac762212b882ebdd46312

but … when I run on Suse Enterprise Server 9 (patch level 3) I get:

./abc/11.5.0/sql/abc13.sql           1607      M            oraapp1               dba        A+.   T+.    C+.        6714d4ba1f7ac762212b882ebdd46312

Anyone know how I can make the Suse line look like the RH line?[/QUOTE]

I tried this on my openSUSE Leap 42.1 workstation and it works as per your Red Hat output. I’m guessing it’s related to versions of find available on Red Hat and SLES9 SP3, which is now very old and no longer supported. In the SLES9 output you can see “M”, “A+.”, “T+.”, and “C+.” where in the Red Hat output there is rights and dates.

Please can you post the output from “cat /etc/*-release; find --version” for both your Red Hat and SLES9 test servers.

HTH.