4 ms·
"And `cp -a`, which is like `cp -r` which leaves permissions intact - meaning you can prepend `sudo` without the hassle of changing ownership back." I always u
by 1vuio0pswjnm7 5y ago
"And `cp -a`, which is like `cp -r` which leaves permissions intact - meaning you can prepend `sudo` without the hassle of changing ownership back."
I always use pax instead of cp
mkdir newdir
cd olddir
pax -rw -pp . ../newdir
preserves permissions and access times
cd olddir
pax -rw -pe . ../newdir
preserves ownership, permissions and access times.
- f1refly 5y ago[fire@host ~]$ pax bash: pax: command not found
- 1vuio0pswjnm7 5y agoxbps-query -Rs pax [-] pax-20201030_1 POSIX archiving utility pax from MirOS (plus tar and cpio) https://ftp.debian.org/debian/pool/main/p/pax/ https://ftp.debian.org/debian/pool/main/p/pax/ Or try BSD.
- 1vuio0pswjnm7 5y agohttps://pubs.opengroup.org/onlinepubs/9699919799/utilities/pax.html https://pubs.opengroup.org/onlinepubs/9699919799/utilities/p...