For faster navigation, this Iframe is preloading the Wikiwand page for چک‌سام (دستور لینوکس).

چک‌سام (دستور لینوکس)

اجرای دستور cksum بر روی یک فایل متنی

cksum فرمانی در سیستم‌عاملهای شبه یونیکس است جهت تولید سرجمع یا چکسام برای فایلها یا جریان‌های اطلاعاتی (مانند ورودی و خروجی‌های استاندارد). فرمان Cksum فایل یا فایلهایی را بعنوان آرگومان دریافت می‌کند (یا ورودی استاندارد، اگر فایلی تعریف نشده باشد) و از آنها یک چک‌سام، کد افزونگی چرخشی (CRC) و تعداد بایتهای موجود را محاسبه می‌کند. در خروجی این فرمان، چک‌سام، تعداد بایتها و در انتها نام فایل نوشته خواهد شد.

فرمان cksum می‌تواند برای بررسی کردن برابری دو فایل در کامپیوترهای مختلف استفاده شود. مثلاً زمانی که بخواهیم دو فایل را که توسط یک مسیر انتقال پرنویز کپی شده‌اند با هم مقایسه کنیم و مطمئن شویم که کاملاً مشابه همدیگرند و عملیات کپی به‌درستی انجام شده است. (اگر فایلها در یک کامپیوتر قرار داشته باشند، برابری دو فایل را می‌توان توسط دستور cmp نیز بررسی کرد).

مقدار تولید شده توسط cksum از نظر رمزنگاری امن نیست و می‌توان به سادگی فایل را به شکلی تغییر داد که سرجمع آن تغییر نکند. برای محافظت از یک فایل در برابر تغییرات عمدی باید از روش‌های امن مانند

sha256sum.استفاده نمود.

شکل استفاده

[ویرایش]
cksum [ File ... ]

مثال کاربردی

[ویرایش]
$ cksum test.txt
4038471504 75 test.txt
$

مقدار چک‌سام "۴۰۳۸۴۷۱۵۰۴" محاسبه شده است و سایز فایل test.txt نیز "۷۵" بایت است.

منابع

[ویرایش]

جستارهای وابسته

[ویرایش]
  • md5sum
  • sha1sum
{{bottomLinkPreText}} {{bottomLinkText}}
چک‌سام (دستور لینوکس)
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?