Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.misc > #58126

Re: Copy a file from local to network preserving timestamp

Path csiph.com!tncsrv06.tnetconsulting.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feeder.usenetexpress.com!tr1.iad1.usenetexpress.com!69.80.99.13.MISMATCH!border-2.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-4.nntp.ord.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail
NNTP-Posting-Date Thu, 22 Aug 2024 04:16:58 +0000
Subject Re: Copy a file from local to network preserving timestamp
Newsgroups comp.os.linux.misc
References <va50u0$3tav1$3@dont-email.me>
From "186282@ud0s4.net" <186283@ud0s4.net>
Organization vector apex
Date Thu, 22 Aug 2024 00:16:58 -0400
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0
MIME-Version 1.0
In-Reply-To <va50u0$3tav1$3@dont-email.me>
Content-Type text/plain; charset=utf-8; format=flowed
Content-Language en-US
Content-Transfer-Encoding 8bit
Message-ID <VaecncAcKPEmJlv7nZ2dnZfqnPGdnZ2d@earthlink.com> (permalink)
Lines 39
X-Usenet-Provider http://www.giganews.com
NNTP-Posting-Host 99.101.150.97
X-Trace sv3-Qsbes2M10A9a8boA4GUztociZ7x6Oa9BBwhCTVuoDxvADhUylAlyDO16GZ4x1ZULSDkxbqRMyNHwBYX!0bsM84WgwdKnRsnBWbAyIx9qGk33w1iwGh1ViB27VcarITaG+vRpHTvhjvjOvSPjeK2O2jGIvKGU!wUloIzRN6jMVf/K07sco
X-Abuse-and-DMCA-Info Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info Otherwise we will be unable to process your complaint properly
X-Postfilter 1.3.40
Xref csiph.com comp.os.linux.misc:58126

Show key headers only | View raw


On 8/21/24 11:25 AM, ambaraba wrote:
> I would like to copy a file
> from srcdir [local HDD "UUID=5AAAA.. /mnt/srcdir  ntfs-3g" in fstab]
> to destdir [network share "//192.168.xx.xx /mnt/destdir ... cifs ..." in 
> fstab]
> preserving the original creation date.
> I've tried
>  > cp -p /mnt/srcdir/FILE.jpg /mnt/destdir/FILE.jpg
>  > rsync -vuart /mnt/srcdir      /mnt/destdir
>  > dd ... can't remember the options
> I've also tried with "freefilesync"
> Unfortunately the timestamp on the destination is not preserved :-(
> Is it there a way to
> copy a file (many files) from local to network share
> preserving timestamp ?
> I'm considering "timeshift" but honestly ...
> THANKS for any help


   "cp -p <whatever> <wherever>" ... preserves time and ownership.

   The '-a' "archive" mode can do the same. Experiment
   with where/when to add a trailing slash with that one.

   I've heard "touch -r" can actually do the same, but
   have never used it that way. Probably evokes 'cp -p'.

   If using some computer language's libraries to copy
   stuff you MAY have to do it in two or three steps -
   ie "get time/owner data", "do the copy", "set the
   dest file with the original info". I wrote a lot
   of backup programs - that oft stored compressed
   and/or encrypted copies - and you kinda HAD to
   do it this way just to be sure. Not HARD, but a
   couple extra steps nevertheless.

   Mosty this stuff is much easier with Linux/Unix than
   in Winders. TRY to interpret THOSE docs for the Win
   'C' library routines  :-)

Back to comp.os.linux.misc | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Copy a file from local to network preserving timestamp ambaraba <ambaraba@none.nn> - 2024-08-21 17:25 +0200
  Re: Copy a file from local to network preserving timestamp The Natural Philosopher <tnp@invalid.invalid> - 2024-08-21 16:40 +0100
  Re: Copy a file from local to network preserving timestamp Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2024-08-21 16:05 +0000
    Re: Copy a file from local to network preserving timestamp ambaraba <ambaraba@none.nn> - 2024-08-21 19:04 +0200
  Re: Copy a file from local to network preserving timestamp "186282@ud0s4.net" <186283@ud0s4.net> - 2024-08-22 00:16 -0400
  Re: Copy a file from local to network preserving timestamp Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-08-22 05:32 +0000
    Re: Copy a file from local to network preserving timestamp vallor <vallor@cultnix.org> - 2024-08-22 07:09 +0000
  Re: Copy a file from local to network preserving timestamp "Carlos E.R." <robin_listas@es.invalid> - 2024-08-23 14:56 +0200

csiph-web