Sujet : Re: how copy file on linux?
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.cDate : 26. Jun 2024, 22:48:15
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v5i2b0$2bd8m$1@dont-email.me>
References : 1
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 26.06.2024 22:44, Thiago Adams wrote:
How to copy a file on linux keeping the original file information?
timestamp etc?
This is an OS question and I'm not sure you want the shell command
or the library function.
On a Linux shell I do
cp -p # to preserve attributes
cp -a # incl. -p, to do a lot like copying recursive a directory
Or in other words the equivalent of CopyFileA from windows.
And what exactly does it do? (Windows has - for example, since you
mentioned time stamps above - other time information than Unix
systems. So it may not be what you expect.)
Janis