/pxcp

Peter's Extended Copy Tool

Primary LanguageCBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

# pxcp

Peter's Extended Copy Tool for FreeBSD, Linux & MacOS (and Solaris in the future)

Supports copying and mirroring file trees including attributes, timestamps, ACLs, Extended Attributes,
File Flags.


AUTHOR

  Peter Eriksson <pen@lysator.liu.se>


Handles various ACLs:

 POSIX (Linux, FreeBSD)
 ZFS (FreeBSD)
 NFS4 (all, including on Linux)
 EXTENDED (MacOS)



USAGE:

  ./pxcp [options] <src> [.. <src-N>] [<dst>]

Options:
  -a    --all           Archive mode (enables c,g,m,o,r,t,A,F,T,X options)
  -d    --depth         Max recursive depth
  -e    --exist         Only copy to existing targets
  -f    --force         Force updates
  -g    --groups        Copy object group
  -h    --help          Display usage information
  -i    --ignore        Ignore non-fatal errors and continue
  -m    --modes         Copy mode bits
  -n    --dryrun        Enable dry-run mode
  -o    --owners        Copy object owner
  -p    --prune         Prune removed objects
  -r    --recurse       Enable recursion
  -s    --sizes         Only copy files if sizes differ
  -t    --times         Only copy files if timestamps differ
  -u    --metaonly      Only copy metadata
  -v    --verbose       Set verbosity level
  -w    --warnings      Display warnings/notices
  -x    --xdev          Stay in same filesystem
  -A    --acls          Copy ACLs
  -C    --checksum      Only copy files if checksums differs
  -D    --debug         Set debugging level
  -F    --flags         Copy object flags
  -L    --list          List objects
  -M    --mmap          Use mmap(2)
  -S    --sync          Select file sync modes
  -T    --timestamps    Copy timestamps
  -X    --xattrs        Copy Extended Attributes

All options may optionally take a argument. Short options only numeric (-v3)
Long options numeric or string (--depth=1k, --checksum=sha256).
Numbers may be specified as decimal, octal (preceed with 0) or
hexadecimal (preceed 0x) and with an optional suffix (k, m, g, t) multiplier.


DIGESTS

   0. NONE
   1. XXHASH32
   2. XXHASH64
   3. FLETCHER16
   4. FLETCHER32
  21. ADLER32
  22. CRC32
  31. MD5
  41. SKEIN256
  51. SHA256
  52. SHA384
  53. SHA512

(XXHASH & FLETCHER is always available, the rest depends on the system)



EXAMPLES:
	# pxcp -vap src-dir dst-dir
	Verbose, Archive, and Prune (ie, mirror src-dir to dst-dir)

	# pxcp -vam -t0 src-dir dst-dir
	Verbose, Archive, Metadata only (do not touch file contents), disable clone timestamps

        # pxcp --verbose=3 --times=0 src-dir dst-dir