Don't have to be happy. This script doesn't do what you want.
Python doesn't track anything. The script stops because of in the while condition f1.read() finally doesn't return anything.
And you have written to the new destination only the first 10M of the f1. In every loop, chunk is written to f2 but it holds the same data. It never changes.
victor at Jerry in ~
↪ sha1sum '/media/storage/Download/Video/Etcher-Portable-1.3.1-x64.exe'
aea0b63b9bc0881662dd47b036a5f1324f5a6ed3 /media/storage/Download/Video/Etcher-Portable-1.3.1-x64.exe
victor at Jerry in ~
↪ sha1sum '/tmp/Etcher-Portable-1.3.1-x64.exe'
6e455cda41e2a0c4e8954f4776446c59591569c1 /tmp/Etcher-Portable-1.3.1-x64.exe
See?
Python doesn't track anything. The script stops because of in the while condition f1.read() finally doesn't return anything.
And you have written to the new destination only the first 10M of the f1. In every loop, chunk is written to f2 but it holds the same data. It never changes.
victor at Jerry in ~
↪ sha1sum '/media/storage/Download/Video/Etcher-Portable-1.3.1-x64.exe'
aea0b63b9bc0881662dd47b036a5f1324f5a6ed3 /media/storage/Download/Video/Etcher-Portable-1.3.1-x64.exe
victor at Jerry in ~
↪ sha1sum '/tmp/Etcher-Portable-1.3.1-x64.exe'
6e455cda41e2a0c4e8954f4776446c59591569c1 /tmp/Etcher-Portable-1.3.1-x64.exe
See?