寻找C系统调用来复制文件 [英] Looking for a C system call to copy files

查看:57
本文介绍了寻找C系统调用来复制文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




是否有UNIX C系统命令可以让我复制文件?

我正在寻找类似于cp的东西;这可以在一个

C程序中调用。

我知道链接系统调用,但此命令将设置一个

秒文件作为第一个文件的链接,而不是第一个文件的独立

副本。

(Windows有CopyFile命令,但我没有找到任何

在UNIX下可以工作)


我也在寻找C命令移动文件。是C系统调用

" rename"相当于Window的特定MoveFileEx功能?


谢谢,

Avner

Hi,

Is there a UNIX C system command that will let me copy a file?
I am looking for something similar to "cp" that can be called within a
C program.
I know of the "link" system call but this command will set a the
second file as a link to the first file rather than an independent
copy of the first file.
(Windows has the CopyFile command but I didn''t find anything that
would work under UNIX)

I am also looking for C commands to move files. Is the C system call
"rename" equivalent to Window''s specific MoveFileEx function?

Thanks,
Avner

推荐答案

Avi写道:
Avi wrote:




是否有UNIX C系统命令让我复制一个文件?
Hi,

Is there a UNIX C system command that will let me copy a file?



请不要在Usenet上多发帖子。请参阅我在其他地方的回复。


-

Ian Collins。

Please don''t multi-post on Usenet. See my reply elsewhere.

--
Ian Collins.


这篇关于寻找C系统调用来复制文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆