I am running a script that copy a file from one location to other. In script I am calculating MD5sum using below command of original file and copied file and they are different:
echo -n "file" | md5sum
How come a same file have different MD5sum? Does copy command change something in Linux?
I have also checked checksum using cksum filename and it is also coming different.
echo -n "file" | md5sumcalculates the sum of the string "file", you wantcat file | md5sumor justmd5sum file