xcp(1)

πŸ’… xcp(1) β€” proof-of-concept cp(1) with alternate copying mechanisms πŸ’…

🌸 Name 🌸

xcp β€” proof-of-concept cp(1) with alternate copying mechanisms. bestie, it’s giving β€œwhat if copying files had more drama?” ✨

πŸŽ€ Syntax πŸŽ€

xcp [-d] [-m|--mmap] [-s|--splice] fromfile tofile

✨ Description ✨

Copies the file from src to dst using mmap(2) or splice(2) instead of the read(2)-write(2) cycle that is normally used. mmap may actually be faster than the r/w cycle πŸ‘€πŸ”₯

πŸ’… Options πŸ’…

  • -d β€” calls mmap(2) on both the source and destination, and does a memcpy(3). double mmap energy, no cap 🫢
  • -m, --mmap β€” calls mmap(2) on the source and uses write(2) for the destination. mmap on one side, write on the other, iconic ✨
  • -s, --splice β€” calls splice(2) on a pipe(2) pair. this is silly, but it is what it is because splice(2) does not support file-to-file transfers πŸ’€πŸ« 

πŸ’– okay bye bestie! this page came from hxtools, dated 2008-11-11, and it’s xcp(1) β€” mwah! πŸ’–

πŸ“¦ where this page comes from