news
9
cp: -r or -R?
2026-10-05

A recent discussion clarifies the critical differences between the -r and -R recursive copy flags of the cp command. The historic -r flag is strongly discouraged because it dereferences symbolic links and treats special files as regular files, which can cause system hangs or fill up disk space. In contrast, the POSIX-compliant -R flag correctly preserves symbolic links and special files, making it the recommended standard for recursive directory copying.

Only full members can comment

Log in to express your opinion.

No comments yet.