Preserving File Permissions When Copying in Linux
Use the -p flag with cp to preserve file permissions: cp -p /aaa/bbb /ccc/ddd
Use the -p flag with cp to preserve file permissions: cp -p /aaa/bbb /ccc/ddd
Not sure which Linux distribution you’re running? Open a terminal and type: cat /etc/issue On Debian 4.0, for example, this outputs: Debian GNU/Linux 4.0 \n \l The \n and \l are escape sequences for the hostname and terminal device – they’re not part of the distribution name. This works on most distributions. Some also have /etc/os-release with more detail: cat /etc/os-release