[Ubuntu]How to copy and compare a file ?

Copy the file between the SATA SSD/USB key/DVD disk

a Prepare a 500MB TXT file in the 2nd SSD, command:    sudo dd if=/dev/zero of=500M.txt bs=1M count=500
b Mount the 2nd SSD to the directory /mnt,  command:  mount /dev/sdb /mnt
c Copy the file between the SATA SSD, command: sudo cp /mnt/500M.txt  /home/user/music/500M.txt
d Compare the files beteewn two location,export the diff result to a log file,command: sudo diff /mnt/500M.txt  /home/user/500M.txt  > /home/user/diff_result.log
e Confirm  if the diff_result.log  is no content,no content means no different between two files.Test pass.