[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: cp -p
From: |
Philip Rowlands |
Subject: |
RE: cp -p |
Date: |
Sat, 17 Mar 2007 10:04:27 +0000 (GMT) |
On Fri, 16 Mar 2007, Ekanayake, Sumith wrote:
Let give you the trace and the vers...
address@hidden ~]$ strace cp -p c d
execve("/bin/cp", ["cp", "-p", "c", "d"], [/* 52 vars */]) = 0
[ snip unnecessary output ]
lstat64("d", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
This isn't quite clear from the example given initially, as here file
"d" already exists. However...
stat64("d", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
stat64("c", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
stat64("d", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
open("c", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
open("d", O_WRONLY|O_TRUNC|O_LARGEFILE) = 4
"d" is now empty (truncated).
fstat64(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
read(3, "", 32768) = 0
close(4) = 0
close(3) = 0
Nothing to read from "c", so the files are closed.
utime("d", [2007/03/16-13:59:47, 2007/03/16-13:59:47]) = 0
getxattr("c", "system.posix_acl_access", 0xbfff96e0, 132) = -1 ENODATA (No data
available)
stat64("c", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
setxattr("d", "system.posix_acl_access", 0x9928d80, 28, ) = -1 EINVAL (Invalid
argument)
This is where "invalid argument" is coming from. What happens if file
"d" doesn't exist in the first place?
Cheers,
Phil
- cp -p, Ekanayake, Sumith, 2007/03/16
- Re: cp -p, Matthew Woehlke, 2007/03/16
- Re: cp -p, Paul Eggert, 2007/03/16
- RE: cp -p, Ekanayake, Sumith, 2007/03/16
- Re: cp -p, Paul Eggert, 2007/03/16
- RE: cp -p,
Philip Rowlands <=
- RE: cp -p, Ekanayake, Sumith, 2007/03/22
- RE: cp -p, Philip Rowlands, 2007/03/23