Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with this script please 1

Status
Not open for further replies.

brittcams

IS-IT--Management
Jun 28, 2016
1
0
0
US
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" \; \)

This script fails in an AIX environment - looking for suggestions as how to make it run w/o errors in an AIX Environment.

Thanks in advance
 
I think the easiest way is to install gnu find by: and probably also coreutils (to get md5sum you use too)

or same from IBM's AIX toolbox for linux builds or from:

ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/findutils/findutils-4.4.2-3.aix6.1.ppc.rpm
ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/coreutils/coreutils-8.25-1.aix6.1.ppc.rpm

update: I've checked your command on AIX with findutils/coreutils installed on and it works:

Code:
$ oslevel -s
5300-11-03-1013
$ rpm -qa|grep -e findut -e coreut
coreutils-8.9-1
findutils-4.4.2-2
$ /opt/freeware/bin/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" \; \)
.       256     drwxr-xr-x      auser agroup    2016-06-29+11:02:14.0000        2016-06-29+11:01:52.0000        2016-06-29+11:01:52.0000
$
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top