Linux command
crc32 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Calculate CRC32 checksum
crc32 [path/to/file]
Calculate checksum for multiple
crc32 [file1] [file2] [file3]
Calculate checksum from stdin
echo "[text]" | crc32 /dev/stdin
Compare checksums
crc32 [file1] [file2]
说明
crc32 calculates the CRC-32 checksum for files, using the same polynomial as used in ZIP archives, gzip, and PNG files. It outputs the checksum as an 8-character hexadecimal value. CRC-32 (Cyclic Redundancy Check) is a hash function used primarily for detecting accidental changes to data. While not cryptographically secure, it's widely used in file formats and network protocols for error detection due to its speed and simplicity. The command processes files specified on the command line, outputting the checksum along with the filename. It's useful for verifying file integrity, comparing files, and working with archives or protocols that use CRC-32 checksums.
参数
- /dev/stdin
- Use to read from standard input.
FAQ
What is the crc32 command used for?
crc32 calculates the CRC-32 checksum for files, using the same polynomial as used in ZIP archives, gzip, and PNG files. It outputs the checksum as an 8-character hexadecimal value. CRC-32 (Cyclic Redundancy Check) is a hash function used primarily for detecting accidental changes to data. While not cryptographically secure, it's widely used in file formats and network protocols for error detection due to its speed and simplicity. The command processes files specified on the command line, outputting the checksum along with the filename. It's useful for verifying file integrity, comparing files, and working with archives or protocols that use CRC-32 checksums.
How do I run a basic crc32 example?
Run `crc32 [path/to/file]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does /dev/stdin do in crc32?
Use to read from standard input.