Example md5sum usage

Include a single “<FILE>” variable, defining it as the complete path to a desired file.

Command format

md5sum <OPTION> <FILE>...

Example md5sum for a single file

This example performs an md5sum check from the /123456 directory. The target file is located in a subdirectory videos/movie.mp4.

[123456]$ md5sum videos/movie.mp4

Example md5sum output

The output displays a hash for the movie.mp4 file located in the videos subdirectory.

[123456]$ md5sum videos/movie.mp4
b965eec52cb45513be023bbf5e6f2484  videos/movie.mp4

Example recursive md5sum

This example performs a recursive md5sum -r * check from the /123456 directory.
[123456]$ md5sum -r *

Example recursive md5sum output

The md5sum command ignores the symlink to a directory.

[123456]$ md5sum -r *
b965eec52cb45513be023bbf5e6f2484  symlinks/movie.mp4
md5sum: symlinks/subtitles: ignore symlink to a directory
b965eec52cb45513be023bbf5e6f2484  videos/movie.mp4
426b3ac01d3584c820f3b7f5985d6623  videos/subtitles/subtitle.srt