Under the folder /usr/hdp/2.6.4.0-91/tez_hive2/lib/
We have .jar files as the following
$ ls /usr/hdp/2.6.4.0-91/tez_hive2/lib/ | grep ".jar"
async-http-client-1.8.16.jar
azure-data-lake-store-sdk-2.1.4.jar
commons-cli-1.2.jar
commons-codec-1.4.jar
commons-collections-3.2.2.jar
commons-collections4-4.1.jar
commons-io-2.4.jar
commons-lang-2.6.jar
commons-math3-3.1.1.jar
guava-11.0.2.jar
hadoop-aws-2.7.3.2.6.4.0-91.jar
hadoop-azure-2.7.3.2.6.4.0-91.jar
hadoop-azure-datalake-2.7.3.2.6.4.0-91.jar
hadoop-mapreduce-client-common-2.7.3.2.6.4.0-91.jar
hadoop-mapreduce-client-core-2.7.3.2.6.4.0-91.jar
hadoop-yarn-server-timeline-pluginstorage-2.7.3.2.6.4.0-91.jar
jersey-client-1.9.jar
jersey-json-1.9.jar
jettison-1.3.4.jar
jetty-6.1.26.hwx.jar
jetty-util-6.1.26.hwx.jar
jsr305-3.0.0.jar
metrics-core-3.1.0.jar
protobuf-java-2.5.0.jar
RoaringBitmap-0.4.9.jar
servlet-api-2.5.jar
slf4j-api-1.7.10.jar
I want to count all characters from the .jar files by wc , in order to understand if .jar files renamed
So I do the following command in order to count all characters from all .jar files
ls /usr/hdp/2.6.4.0-91/tez_hive2/lib/ | grep ".jar" | sed s'/\// /g' | awk '{print $NF}' | wc | awk '{print $NF}'
758
So in this case we get 758 characters from all .jars
But the command isn’t elegant
How we can improve the command to be better?
ls -l | awk '{print $NF} > jarlog.txt
so that you can compare the filenames. – Nasir Riley Feb 28 at 19:22printf '%s\n' *.jar | md5sum
wouldn't be blind to renaming to something with the same amount of letters. – Kamil Maciorowski Feb 28 at 19:32