diff --git a/src/uucore/src/lib/features/checksum/compute.rs b/src/uucore/src/lib/features/checksum/compute.rs index 0868137c6..66f2978bd 100644 --- a/src/uucore/src/lib/features/checksum/compute.rs +++ b/src/uucore/src/lib/features/checksum/compute.rs @@ -261,7 +261,15 @@ where Box::new(stdin_buf) as Box } else { file_buf = match File::open(filepath) { - Ok(file) => file, + Ok(file) => { + #[cfg(any( + target_os = "linux", + target_os = "android", + target_os = "freebsd" + ))] + let _ = rustix::fs::fadvise(&file, 0, None, rustix::fs::Advice::Sequential); + file + } Err(err) => { show!(err.map_err_context(|| filepath.to_string_lossy().into())); continue;