NFS-CP(1) nfs-cp: copy files to/from an NFS-CP(1)

# [NAME](#NAME)

nfs-cp - Utility to copy files to/from and NFS server

# [SYNOPSIS](#SYNOPSIS)

**nfs-cp &lt;src&gt; &lt;dst&gt;**

# [DESCRIPTION](#DESCRIPTION)

nfs-cp is a utility to copy files to/from and NFS server.

When the source is read over NFSv4.2, nfs-cp copies sparse files sparsely. It asks the server where the data is, using the SEEK operation, and copies only those regions, so the holes are neither read from the source nor written to the destination. The destination is given the full size of the source up front and the skipped regions are left as holes in it; where the destination is also NFSv4.2 they are deallocated explicitly with DEALLOCATE.

This needs the source to be NFSv4.2, for example nfs://server/path/file?version=4.2. Any other source is copied in full, hole or no hole, as the holes cannot be located.

Examples:

```
$ nfs-cp foo.c nfs://127.0.0.1/data/tmp/foo.c
$ nfs-cp nfs://127.0.0.1/data/tmp/foo.c bob.c
$ nfs-cp nfs://127.0.0.1/data/tmp/foo.c nfs://127.0.0.1/data/tmp/copy-of-foo.c


      
```

# [SEE ALSO](#SEE_ALSO)

**http://github.com/sahlberg/libnfs**

08/30/2026 nfs-cp

---

Document: nfs-cp(1) from libnfs 8.0.0-r0 (Chainguard OS)
