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


Groups > comp.lang.c > #386579

Re: how copy file on linux?

Path csiph.com!news.swapon.de!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From Keith Thompson <Keith.S.Thompson+u@gmail.com>
Newsgroups comp.lang.c
Subject Re: how copy file on linux?
Date Wed, 26 Jun 2024 15:35:00 -0700
Organization None to speak of
Lines 16
Message-ID <87v81vs57v.fsf@nosuchdomain.example.com> (permalink)
References <v5huk1$2anbd$1@dont-email.me>
MIME-Version 1.0
Content-Type text/plain
Injection-Date Thu, 27 Jun 2024 00:35:00 +0200 (CEST)
Injection-Info dont-email.me; posting-host="2dc86e450632c25820fa91c1ec368267"; logging-data="2469342"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+CjX7rSeZHucO2xW8ZE3ML"
User-Agent Gnus/5.13 (Gnus v5.13)
Cancel-Lock sha1:I/mU8oAKiV3S7nEG+FU32x3xX3Y= sha1:aYdUGJSewR5G/6IGUlyu+l07eQc=
Xref csiph.com comp.lang.c:386579

Show key headers only | View raw


Thiago Adams <thiago.adams@gmail.com> writes:
> How to copy a file on linux keeping the original file information?
> timestamp etc?
>
> Or in other words the equivalent of CopyFileA from windows.

comp.unix.programmer is likely to give you better answers.  I don't
think POSIX defines any functions that copy files.

If I uunderstand correctly, you want to do the equivalent of "cp -p",
but from C rather than from a shell.  You might consider using system(),
but that has some drawbacks, and there are probably better ways.

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */

Back to comp.lang.c | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

how copy file on linux? Thiago Adams <thiago.adams@gmail.com> - 2024-06-26 17:44 -0300
  Re: how copy file on linux? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-06-26 23:48 +0200
  Re: how copy file on linux? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-06-26 15:35 -0700
    Re: how copy file on linux? Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2024-06-26 23:24 +0000
  Re: how copy file on linux? Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-06-26 23:43 +0000
    Re: how copy file on linux? scott@slp53.sl.home (Scott Lurndal) - 2024-06-27 00:36 +0000
      Re: how copy file on linux? Bonita Montero <Bonita.Montero@gmail.com> - 2024-06-28 10:19 +0200
  Re: how copy file on linux? Bonita Montero <Bonita.Montero@gmail.com> - 2024-06-28 20:15 +0200
    Re: how copy file on linux? scott@slp53.sl.home (Scott Lurndal) - 2024-06-28 19:22 +0000
    Re: how copy file on linux? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2024-06-29 00:04 +0100
      Re: how copy file on linux? Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2024-06-28 23:25 +0000
        Re: how copy file on linux? Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2024-06-28 23:27 +0000

csiph-web