Reputation: 485
I want to compare hdfs file with unix file.I know the one way using cat command we can compare files because of cat command also provided by Hadoop Distributed File System (HDFS).
Let's take one example :
# hdfs dfs -ls -R /demo
-rw-r--r-- 3 root hdfs 129617 2014-10-17 12:22 /demo/abc.log
#ls /tmp
xyz.log
Here i want to compare abc.log
to xyz.log
. Any better approach??
Upvotes: 2
Views: 1222
Reputation: 4240
You could probably use shell redirection + diff.
diff <(hdfs dfs -cat /demo/abc.log) <(cat /tmp/xyz.log)
Upvotes: 2