Created
August 3, 2026 21:14
-
-
Save hyzyla/fc577c67bdcd21f609df702c3edc90cd to your computer and use it in GitHub Desktop.
macos-copy-on-write-dir.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cow_clonedir() { python3 -c "import ctypes,ctypes.util,sys,os;l=ctypes.CDLL(ctypes.util.find_library('System'),use_errno=True);sys.exit(0 if l.clonefile(sys.argv[1].encode(),sys.argv[2].encode(),0)==0 else os.strerror(ctypes.get_errno()))" "$1" "$2"; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment