From the course: Learning Linux Shell Scripting

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

File checksums

File checksums - Linux Tutorial

From the course: Learning Linux Shell Scripting

Start my 1-month free trial

File checksums

- [Instructor] A checksum is a value that is used to validate the integrity of a file. Let's run a checksum on the file names.text. From the terminal cksum names.txt. The output has three values. The checksum, the size of the file in bytes and the name of the file. Let's see if we can detect us tampering with the file. Adam names.txt. Let's add an extra E to the end of the name Rene. Do a control S to save, return to the terminal and run the checksum again. This time the checksum is very different than the first time we ran it and the size of the file has increased by one byte. Let's return names.txt to the way we found it and run checksum one more time. So, we say atom names.txt and we gonna delete that extra E we put on here. Do a control S. Return to the terminal and we run checksum one more time. And we see the original checksum is restored. Now we know how to use the checksum command and we can validate the integrity of our files.

Contents