Skip to Content
gnux

--preserve

Preserve the listed attributes: mode, ownership, timestamps, links, all.

An option of cpx.

Usage

cpx --preserve[=string] SOURCE... DIRECTORY

Details

ShortLongValueDefaultMeaning
--preservestring (optional)preserve the listed attributes: mode, ownership, timestamps, links, all

Examples

Preserve only the timestamps, or archive without carrying over ownership

cpx --preserve=timestamps photo.jpg archive/ && cpx -a --no-preserve=ownership project/ copy/

Help in the terminal

gnux help cpx --preserve

On this page