I was doing a : tar -cvf
and I had to killed it with ctrl-C
.
I know I should have done a Ctrl-Z
and then bring back the task to foreground… but it's not the story.
Can I resume from the point I stopped the task ?
tar
I was doing a : tar -cvf
and I had to killed it with ctrl-C
.
I know I should have done a Ctrl-Z
and then bring back the task to foreground… but it's not the story.
Can I resume from the point I stopped the task ?
Best Answer
This method will recreate your tar archive, and append the finished part to the existing file. This can be useful if backing up over a network connection. You will likely result in a corrupt archive if any of the data in your INFILES has changed. Be sure to test your archive after completion.
Change INFILES and OUTFILE to the correct names on the following line.
Explanation:
SIZE="$(wc -c < $OUTFILE)"
# Get the current size of the archive.tar -cz --to-stdout "$INFILES" |
# Begin creating archive and send output totail
command.tail -c +$(($SIZE+1)) >>
# Disregard the data before $SIZE+1, and resume the rest of the archive $OUTFILE.