Tom Asked: 2012-01-20 14:01:54 +0800 CST2012-01-20 14:01:54 +0800 CST 2012-01-20 14:01:54 +0800 CST Does cp -p apply to the source or destination file? 772 When I use -p to preserve the file permissions of a file being copied, does it apply to the source or the destination file (if it already exists)? Thanks linux cp 1 Answers Voted Best Answer Aaron Copley 2012-01-20T14:05:45+08:002012-01-20T14:05:45+08:00 It's preserves the source file's attributes (mode, ownership, and timestamps) in the destination. (Provided the destination file system supports it.) If a file already exists it will be overwritten with the source and it's attributes, unless you've combined the -i flag.
It's preserves the source file's attributes (mode, ownership, and timestamps) in the destination. (Provided the destination file system supports it.)
If a file already exists it will be overwritten with the source and it's attributes, unless you've combined the -i flag.