---
name: "dar_cp"
section: "1"
platform: "linux"
package: "dar"
version: "2.7.17-1+b19"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/dar_cp"
---

# dar\_cp(1)

'cp' clone command that is able to copy data located after an I/O error

## NAME

dar\_cp - 'cp' clone command that is able to copy data located after an I/O error

## SYNOPSIS

dar\_cp \[-f\] \<source file\> \<destination file\>

dar\_cp -h

dar\_cp -V

## DESCRIPTION

**dar\_cp** is similar to the standard 'cp' command, except it does not stop copying when an I/O error is met. Instead, it skips a bit further and continues to copy the rest of the file, as much as possible, filling the gaps by zeroed bytes.

**dar\_cp** only accepts full filename (not directory) as argument. The reason of its existence in dar package is that you need it if you use Parchive with dar and have a corruption on a CD-R or any other read-only medium. You need to copy the corrupted slice on a read-write filesystem, for Parchive be able to repair it using slice associated redundancy files.

## OPTIONS

- \-h

  Displays help usage.

- \-V

  Displays version information.

- \-f

  without -f option, dar\_cp will abort if the destination file exists, this is to prevent human error. However it may be useful to have a special device as destination like when facing a disk corruption in a unused block. dar\_cp can then copy the content of this disk to another one of equal or larger size. But in that case the destination is also a special device and has to exists before dar\_cp runs, where from the need of -f option. Once the disk copy has finished, one can then eventually resize partitions and file-systems to leverage the new larger disk.

## EXIT CODES

**dar\_cp** exists with the following codes:

- 0

  upon normal execution (be some corrupted parted skipped or not)

- 1

  syntax error on command-line

- 2

  could not open source or destination files

- 3

  any other system error met during the copy

- 5

  when some data could not be copied due to I/O error

## SIGNALS

Any signal sent to dar\_cp will abort the program immediately, there is no way to have a proper termination before the end of the process

## SEE ALSO

[dar(1)](/dar/1.md), [dar\_xform(1)](/dar_xform/1.md), [dar\_manager(1)](/dar_manager/1.md), [dar\_slave(1)](/dar_slave/1.md), [dar\_split(1)](/dar_split/1.md)

## KNOWN BUGS

http://sourceforge.net/p/dar/bugs/

## AUTHOR

```
http://dar.linux.free.fr/
Denis Corbin
France
Europe
```
