How to copy files with bad sectors

written by Admin

Posted on 2013-10-28


I must copy a file that has bad blocks (only a file, not a partition)


You can use dd in a root shell:
# dd if='source_file' of='dest_file' bs=4k conv=noerror,sync

To watch progress, open a new shell, find the pid of the dd process using pgrep (or ps) and run watch to force the process to print statistics on the first shell:
# pgrep -l '^dd$'
1019 dd

# watch -n 10 kill -USR1 1019



Leave a Comment:



We need collaboration and a real boost from our community: write us an email for every trick you find!

This website is a sysadmin swiss-knife for every-day Windows, Linux and Mac administration and troubleshooting

Our database grows if YOU send us your tips and trick as soon as you find them every day!