uutils/coreutils · error
Failed to sync renamed file
Error message
Failed to sync renamed file
What it means
Error "Failed to sync renamed file" thrown in uutils/coreutils.
Source
Thrown at src/uu/shred/src/shred.rs:827
}
match fs::rename(&last_path, &new_path) {
Ok(()) => {
if verbose {
show_error!(
"{}: {} {}",
last_path.maybe_quote().to_string(),
translate!("shred-renamed-to"),
new_path.display().to_string()
);
}
if remove_method == RemoveMethod::WipeSync {
// Sync every file rename
let new_file = OpenOptions::new()
.write(true)
.open(new_path.clone())
.expect("Failed to open renamed file for syncing");
new_file.sync_all().expect("Failed to sync renamed file");
}
last_path = new_path;
break;
}
Err(e) => {
let msg = translate!("shred-couldnt-rename", "file" => last_path.maybe_quote(), "new_name" => new_path.quote(), "error" => e);
show_error!("{msg}");
// TODO: replace with our error management
std::process::exit(1);
}
}
}
}
last_path
}
View on GitHub (pinned to 8b8cbfd51b)
Solutions
- Check that the filesystem supports fsync on the renamed file and the file handle is valid.
- Free disk space and verify the device is healthy, since sync failures often indicate I/O errors.
When it happens
Trigger: Occurs when shred fails to fsync a renamed file during the wiping process.
Common situations: I/O errors on the underlying device or filesystems not supporting sync during shred's rename phase.
AI-assisted analysis of uutils/coreutils@8b8cbfd51b (2026-08-19).
Data as JSON: /api/errors/133804131e71b3ac.
Report an issue: GitHub.