multiple forms of sum in core utilities
Upon reading GNU Core Utilities - Wikipedia, I find multiple sum
me@alpha:~$ cksum nohup.out
4104911401 101860700 nohup.out
me@alpha:~$ b2sum nohup.out
468c86394c5c4be04d0bce3b98584197b0c3f4cbb630144818f9d77d48ab7296e4c53db481b6bdd7c46dd5203d3f016d9ef01b126806e04be5003aeebb1bc6
22 nohup.out
me@alpha:~$ sum nohup.out
37767 99474
me@alpha:~$ sha1sum nohup.out
79106925d593e18bd148ba94a6e4fb9da02e8c47 nohup.out
me@alpha:~$ md5sum nohup.out
3be4b17f18e4715d849a31ae482565cf nohup.out
I started learning linux months ago, should I have to distinguish them and utilize them in daily operation?
coreutils
add a comment |
Upon reading GNU Core Utilities - Wikipedia, I find multiple sum
me@alpha:~$ cksum nohup.out
4104911401 101860700 nohup.out
me@alpha:~$ b2sum nohup.out
468c86394c5c4be04d0bce3b98584197b0c3f4cbb630144818f9d77d48ab7296e4c53db481b6bdd7c46dd5203d3f016d9ef01b126806e04be5003aeebb1bc6
22 nohup.out
me@alpha:~$ sum nohup.out
37767 99474
me@alpha:~$ sha1sum nohup.out
79106925d593e18bd148ba94a6e4fb9da02e8c47 nohup.out
me@alpha:~$ md5sum nohup.out
3be4b17f18e4715d849a31ae482565cf nohup.out
I started learning linux months ago, should I have to distinguish them and utilize them in daily operation?
coreutils
add a comment |
Upon reading GNU Core Utilities - Wikipedia, I find multiple sum
me@alpha:~$ cksum nohup.out
4104911401 101860700 nohup.out
me@alpha:~$ b2sum nohup.out
468c86394c5c4be04d0bce3b98584197b0c3f4cbb630144818f9d77d48ab7296e4c53db481b6bdd7c46dd5203d3f016d9ef01b126806e04be5003aeebb1bc6
22 nohup.out
me@alpha:~$ sum nohup.out
37767 99474
me@alpha:~$ sha1sum nohup.out
79106925d593e18bd148ba94a6e4fb9da02e8c47 nohup.out
me@alpha:~$ md5sum nohup.out
3be4b17f18e4715d849a31ae482565cf nohup.out
I started learning linux months ago, should I have to distinguish them and utilize them in daily operation?
coreutils
Upon reading GNU Core Utilities - Wikipedia, I find multiple sum
me@alpha:~$ cksum nohup.out
4104911401 101860700 nohup.out
me@alpha:~$ b2sum nohup.out
468c86394c5c4be04d0bce3b98584197b0c3f4cbb630144818f9d77d48ab7296e4c53db481b6bdd7c46dd5203d3f016d9ef01b126806e04be5003aeebb1bc6
22 nohup.out
me@alpha:~$ sum nohup.out
37767 99474
me@alpha:~$ sha1sum nohup.out
79106925d593e18bd148ba94a6e4fb9da02e8c47 nohup.out
me@alpha:~$ md5sum nohup.out
3be4b17f18e4715d849a31ae482565cf nohup.out
I started learning linux months ago, should I have to distinguish them and utilize them in daily operation?
coreutils
coreutils
asked 2 hours ago
AliceAlice
332110
332110
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
The checksum commands that you have found are used most often for verifying data integrity and tracking information. It's as if you solve a math problem, and then look to the answers at the end of the book to ensure that your solution is correct.
Most common example, is when you download software or Ubuntu.iso image, you will see a file such as this (example from SHA256SUM file for 18.04 release):
ff7feb65254b64ffadc00a3ce39df89e3cf84485343063c04fa11859475931c4 *ubuntu-18.04.1-preinstalled-server-armhf+raspi2.img.xz
a5b0ea5918f850124f3d72ef4b85bda82f0fcd02ec721be19c1a6952791c8ee8 *ubuntu-18.04.1-server-amd64.iso
8e9a766b4fed214632c8fd0f039c372fe18b0e5a2f4a4167f5c1edd5090385f4 *ubuntu-18.04.1-server-arm64.iso
dc8aa1b7f9c7d7dd66bbde516e739166126faa55789da0cb63328a507ed5fc00 *ubuntu-18.04.1-server-ppc64el.iso
76f6a384cd943a14761263b725fbccb2ebb04f147efa0c9eb884868e97c2eaac *ubuntu-18.04.1-server-s390x.iso
When you download ubuntu-18.04.1-server-arm64.iso
file, you want to ensure the file was downloaded OK, that there was no tampering with it by someone in the middle of the network, or that there was a corrupt file downloaded. Thus when you do
sha256sum ~/Downloads/ubuntu-18.04.1-server-arm64.iso
you will know right way if the file is OK or not. As for different types, for security applications, the stronger the has sha256
or sha512
the better, because attacker cannot break it. Hashes are one-way functions. Input produces hash, but not the other way around. So for security reasons, passwords are best never stored on servers - only hashes.
When attackers steal information from servers, they should only have hash values of the passwords and not passwords themselves. Now, hashes such as MD5 and SHA1 have been broken and attackers can break them to find original passwords. So you don't have to memorize them, but it's good to know if an application is using a strong hash such as SHA256 or SHA512
add a comment |
should I have to distinguish them and utilize them in daily operation?
No, not really. What you have found is utilities for computing hash sums, which is used for purposes such as file verification.
For instance, when you download a Ubuntu ISO, you will typically find a file containing a checksum, which you can verify. You download the file, and run sha256sum filename
(or md5sum
if it contains md5 checksums, but SHA256 is better than md5), and compare it against the published check sum.
It also allows you to verify that a file has not changed, without having to store an duplicate of the full file. This is used by file verification tools such as tripwire
.
In general, don't worry about those utilities until you see a need for them.
"It also allows you to verify that a file has not changed, without having to store the full file." Well, files stored on local hard drive are already ... stored :) But looking at modification time inls -l
orstat
output is probably faster than calculating checksum in such case . Nice answer, very concise. Have a +1
– Sergiy Kolodyazhnyy
1 hour ago
It allows you to store a small piece of data, the checksum, and not a duplicate of the file, to verify file integrity :) I agree it's a bit...weirdly worded by me :)
– vidarlo
1 hour ago
OOOOOh. OK, I've read the sentence again. Sorry, my brain foobared there. Yes, hash allows knowing that data is the same without having a duplicate copy of file to compare with to see if it changed.
– Sergiy Kolodyazhnyy
1 hour ago
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1111920%2fmultiple-forms-of-sum-in-core-utilities%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
The checksum commands that you have found are used most often for verifying data integrity and tracking information. It's as if you solve a math problem, and then look to the answers at the end of the book to ensure that your solution is correct.
Most common example, is when you download software or Ubuntu.iso image, you will see a file such as this (example from SHA256SUM file for 18.04 release):
ff7feb65254b64ffadc00a3ce39df89e3cf84485343063c04fa11859475931c4 *ubuntu-18.04.1-preinstalled-server-armhf+raspi2.img.xz
a5b0ea5918f850124f3d72ef4b85bda82f0fcd02ec721be19c1a6952791c8ee8 *ubuntu-18.04.1-server-amd64.iso
8e9a766b4fed214632c8fd0f039c372fe18b0e5a2f4a4167f5c1edd5090385f4 *ubuntu-18.04.1-server-arm64.iso
dc8aa1b7f9c7d7dd66bbde516e739166126faa55789da0cb63328a507ed5fc00 *ubuntu-18.04.1-server-ppc64el.iso
76f6a384cd943a14761263b725fbccb2ebb04f147efa0c9eb884868e97c2eaac *ubuntu-18.04.1-server-s390x.iso
When you download ubuntu-18.04.1-server-arm64.iso
file, you want to ensure the file was downloaded OK, that there was no tampering with it by someone in the middle of the network, or that there was a corrupt file downloaded. Thus when you do
sha256sum ~/Downloads/ubuntu-18.04.1-server-arm64.iso
you will know right way if the file is OK or not. As for different types, for security applications, the stronger the has sha256
or sha512
the better, because attacker cannot break it. Hashes are one-way functions. Input produces hash, but not the other way around. So for security reasons, passwords are best never stored on servers - only hashes.
When attackers steal information from servers, they should only have hash values of the passwords and not passwords themselves. Now, hashes such as MD5 and SHA1 have been broken and attackers can break them to find original passwords. So you don't have to memorize them, but it's good to know if an application is using a strong hash such as SHA256 or SHA512
add a comment |
The checksum commands that you have found are used most often for verifying data integrity and tracking information. It's as if you solve a math problem, and then look to the answers at the end of the book to ensure that your solution is correct.
Most common example, is when you download software or Ubuntu.iso image, you will see a file such as this (example from SHA256SUM file for 18.04 release):
ff7feb65254b64ffadc00a3ce39df89e3cf84485343063c04fa11859475931c4 *ubuntu-18.04.1-preinstalled-server-armhf+raspi2.img.xz
a5b0ea5918f850124f3d72ef4b85bda82f0fcd02ec721be19c1a6952791c8ee8 *ubuntu-18.04.1-server-amd64.iso
8e9a766b4fed214632c8fd0f039c372fe18b0e5a2f4a4167f5c1edd5090385f4 *ubuntu-18.04.1-server-arm64.iso
dc8aa1b7f9c7d7dd66bbde516e739166126faa55789da0cb63328a507ed5fc00 *ubuntu-18.04.1-server-ppc64el.iso
76f6a384cd943a14761263b725fbccb2ebb04f147efa0c9eb884868e97c2eaac *ubuntu-18.04.1-server-s390x.iso
When you download ubuntu-18.04.1-server-arm64.iso
file, you want to ensure the file was downloaded OK, that there was no tampering with it by someone in the middle of the network, or that there was a corrupt file downloaded. Thus when you do
sha256sum ~/Downloads/ubuntu-18.04.1-server-arm64.iso
you will know right way if the file is OK or not. As for different types, for security applications, the stronger the has sha256
or sha512
the better, because attacker cannot break it. Hashes are one-way functions. Input produces hash, but not the other way around. So for security reasons, passwords are best never stored on servers - only hashes.
When attackers steal information from servers, they should only have hash values of the passwords and not passwords themselves. Now, hashes such as MD5 and SHA1 have been broken and attackers can break them to find original passwords. So you don't have to memorize them, but it's good to know if an application is using a strong hash such as SHA256 or SHA512
add a comment |
The checksum commands that you have found are used most often for verifying data integrity and tracking information. It's as if you solve a math problem, and then look to the answers at the end of the book to ensure that your solution is correct.
Most common example, is when you download software or Ubuntu.iso image, you will see a file such as this (example from SHA256SUM file for 18.04 release):
ff7feb65254b64ffadc00a3ce39df89e3cf84485343063c04fa11859475931c4 *ubuntu-18.04.1-preinstalled-server-armhf+raspi2.img.xz
a5b0ea5918f850124f3d72ef4b85bda82f0fcd02ec721be19c1a6952791c8ee8 *ubuntu-18.04.1-server-amd64.iso
8e9a766b4fed214632c8fd0f039c372fe18b0e5a2f4a4167f5c1edd5090385f4 *ubuntu-18.04.1-server-arm64.iso
dc8aa1b7f9c7d7dd66bbde516e739166126faa55789da0cb63328a507ed5fc00 *ubuntu-18.04.1-server-ppc64el.iso
76f6a384cd943a14761263b725fbccb2ebb04f147efa0c9eb884868e97c2eaac *ubuntu-18.04.1-server-s390x.iso
When you download ubuntu-18.04.1-server-arm64.iso
file, you want to ensure the file was downloaded OK, that there was no tampering with it by someone in the middle of the network, or that there was a corrupt file downloaded. Thus when you do
sha256sum ~/Downloads/ubuntu-18.04.1-server-arm64.iso
you will know right way if the file is OK or not. As for different types, for security applications, the stronger the has sha256
or sha512
the better, because attacker cannot break it. Hashes are one-way functions. Input produces hash, but not the other way around. So for security reasons, passwords are best never stored on servers - only hashes.
When attackers steal information from servers, they should only have hash values of the passwords and not passwords themselves. Now, hashes such as MD5 and SHA1 have been broken and attackers can break them to find original passwords. So you don't have to memorize them, but it's good to know if an application is using a strong hash such as SHA256 or SHA512
The checksum commands that you have found are used most often for verifying data integrity and tracking information. It's as if you solve a math problem, and then look to the answers at the end of the book to ensure that your solution is correct.
Most common example, is when you download software or Ubuntu.iso image, you will see a file such as this (example from SHA256SUM file for 18.04 release):
ff7feb65254b64ffadc00a3ce39df89e3cf84485343063c04fa11859475931c4 *ubuntu-18.04.1-preinstalled-server-armhf+raspi2.img.xz
a5b0ea5918f850124f3d72ef4b85bda82f0fcd02ec721be19c1a6952791c8ee8 *ubuntu-18.04.1-server-amd64.iso
8e9a766b4fed214632c8fd0f039c372fe18b0e5a2f4a4167f5c1edd5090385f4 *ubuntu-18.04.1-server-arm64.iso
dc8aa1b7f9c7d7dd66bbde516e739166126faa55789da0cb63328a507ed5fc00 *ubuntu-18.04.1-server-ppc64el.iso
76f6a384cd943a14761263b725fbccb2ebb04f147efa0c9eb884868e97c2eaac *ubuntu-18.04.1-server-s390x.iso
When you download ubuntu-18.04.1-server-arm64.iso
file, you want to ensure the file was downloaded OK, that there was no tampering with it by someone in the middle of the network, or that there was a corrupt file downloaded. Thus when you do
sha256sum ~/Downloads/ubuntu-18.04.1-server-arm64.iso
you will know right way if the file is OK or not. As for different types, for security applications, the stronger the has sha256
or sha512
the better, because attacker cannot break it. Hashes are one-way functions. Input produces hash, but not the other way around. So for security reasons, passwords are best never stored on servers - only hashes.
When attackers steal information from servers, they should only have hash values of the passwords and not passwords themselves. Now, hashes such as MD5 and SHA1 have been broken and attackers can break them to find original passwords. So you don't have to memorize them, but it's good to know if an application is using a strong hash such as SHA256 or SHA512
answered 1 hour ago
Sergiy KolodyazhnyySergiy Kolodyazhnyy
71.3k9147313
71.3k9147313
add a comment |
add a comment |
should I have to distinguish them and utilize them in daily operation?
No, not really. What you have found is utilities for computing hash sums, which is used for purposes such as file verification.
For instance, when you download a Ubuntu ISO, you will typically find a file containing a checksum, which you can verify. You download the file, and run sha256sum filename
(or md5sum
if it contains md5 checksums, but SHA256 is better than md5), and compare it against the published check sum.
It also allows you to verify that a file has not changed, without having to store an duplicate of the full file. This is used by file verification tools such as tripwire
.
In general, don't worry about those utilities until you see a need for them.
"It also allows you to verify that a file has not changed, without having to store the full file." Well, files stored on local hard drive are already ... stored :) But looking at modification time inls -l
orstat
output is probably faster than calculating checksum in such case . Nice answer, very concise. Have a +1
– Sergiy Kolodyazhnyy
1 hour ago
It allows you to store a small piece of data, the checksum, and not a duplicate of the file, to verify file integrity :) I agree it's a bit...weirdly worded by me :)
– vidarlo
1 hour ago
OOOOOh. OK, I've read the sentence again. Sorry, my brain foobared there. Yes, hash allows knowing that data is the same without having a duplicate copy of file to compare with to see if it changed.
– Sergiy Kolodyazhnyy
1 hour ago
add a comment |
should I have to distinguish them and utilize them in daily operation?
No, not really. What you have found is utilities for computing hash sums, which is used for purposes such as file verification.
For instance, when you download a Ubuntu ISO, you will typically find a file containing a checksum, which you can verify. You download the file, and run sha256sum filename
(or md5sum
if it contains md5 checksums, but SHA256 is better than md5), and compare it against the published check sum.
It also allows you to verify that a file has not changed, without having to store an duplicate of the full file. This is used by file verification tools such as tripwire
.
In general, don't worry about those utilities until you see a need for them.
"It also allows you to verify that a file has not changed, without having to store the full file." Well, files stored on local hard drive are already ... stored :) But looking at modification time inls -l
orstat
output is probably faster than calculating checksum in such case . Nice answer, very concise. Have a +1
– Sergiy Kolodyazhnyy
1 hour ago
It allows you to store a small piece of data, the checksum, and not a duplicate of the file, to verify file integrity :) I agree it's a bit...weirdly worded by me :)
– vidarlo
1 hour ago
OOOOOh. OK, I've read the sentence again. Sorry, my brain foobared there. Yes, hash allows knowing that data is the same without having a duplicate copy of file to compare with to see if it changed.
– Sergiy Kolodyazhnyy
1 hour ago
add a comment |
should I have to distinguish them and utilize them in daily operation?
No, not really. What you have found is utilities for computing hash sums, which is used for purposes such as file verification.
For instance, when you download a Ubuntu ISO, you will typically find a file containing a checksum, which you can verify. You download the file, and run sha256sum filename
(or md5sum
if it contains md5 checksums, but SHA256 is better than md5), and compare it against the published check sum.
It also allows you to verify that a file has not changed, without having to store an duplicate of the full file. This is used by file verification tools such as tripwire
.
In general, don't worry about those utilities until you see a need for them.
should I have to distinguish them and utilize them in daily operation?
No, not really. What you have found is utilities for computing hash sums, which is used for purposes such as file verification.
For instance, when you download a Ubuntu ISO, you will typically find a file containing a checksum, which you can verify. You download the file, and run sha256sum filename
(or md5sum
if it contains md5 checksums, but SHA256 is better than md5), and compare it against the published check sum.
It also allows you to verify that a file has not changed, without having to store an duplicate of the full file. This is used by file verification tools such as tripwire
.
In general, don't worry about those utilities until you see a need for them.
edited 1 hour ago
answered 1 hour ago
vidarlovidarlo
9,68352446
9,68352446
"It also allows you to verify that a file has not changed, without having to store the full file." Well, files stored on local hard drive are already ... stored :) But looking at modification time inls -l
orstat
output is probably faster than calculating checksum in such case . Nice answer, very concise. Have a +1
– Sergiy Kolodyazhnyy
1 hour ago
It allows you to store a small piece of data, the checksum, and not a duplicate of the file, to verify file integrity :) I agree it's a bit...weirdly worded by me :)
– vidarlo
1 hour ago
OOOOOh. OK, I've read the sentence again. Sorry, my brain foobared there. Yes, hash allows knowing that data is the same without having a duplicate copy of file to compare with to see if it changed.
– Sergiy Kolodyazhnyy
1 hour ago
add a comment |
"It also allows you to verify that a file has not changed, without having to store the full file." Well, files stored on local hard drive are already ... stored :) But looking at modification time inls -l
orstat
output is probably faster than calculating checksum in such case . Nice answer, very concise. Have a +1
– Sergiy Kolodyazhnyy
1 hour ago
It allows you to store a small piece of data, the checksum, and not a duplicate of the file, to verify file integrity :) I agree it's a bit...weirdly worded by me :)
– vidarlo
1 hour ago
OOOOOh. OK, I've read the sentence again. Sorry, my brain foobared there. Yes, hash allows knowing that data is the same without having a duplicate copy of file to compare with to see if it changed.
– Sergiy Kolodyazhnyy
1 hour ago
"It also allows you to verify that a file has not changed, without having to store the full file." Well, files stored on local hard drive are already ... stored :) But looking at modification time in
ls -l
or stat
output is probably faster than calculating checksum in such case . Nice answer, very concise. Have a +1– Sergiy Kolodyazhnyy
1 hour ago
"It also allows you to verify that a file has not changed, without having to store the full file." Well, files stored on local hard drive are already ... stored :) But looking at modification time in
ls -l
or stat
output is probably faster than calculating checksum in such case . Nice answer, very concise. Have a +1– Sergiy Kolodyazhnyy
1 hour ago
It allows you to store a small piece of data, the checksum, and not a duplicate of the file, to verify file integrity :) I agree it's a bit...weirdly worded by me :)
– vidarlo
1 hour ago
It allows you to store a small piece of data, the checksum, and not a duplicate of the file, to verify file integrity :) I agree it's a bit...weirdly worded by me :)
– vidarlo
1 hour ago
OOOOOh. OK, I've read the sentence again. Sorry, my brain foobared there. Yes, hash allows knowing that data is the same without having a duplicate copy of file to compare with to see if it changed.
– Sergiy Kolodyazhnyy
1 hour ago
OOOOOh. OK, I've read the sentence again. Sorry, my brain foobared there. Yes, hash allows knowing that data is the same without having a duplicate copy of file to compare with to see if it changed.
– Sergiy Kolodyazhnyy
1 hour ago
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1111920%2fmultiple-forms-of-sum-in-core-utilities%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown