Unable to copy using cp command in AIX

974 views Asked by At

I am trying to copy directories recursively using cp -R command in AIX, however certain directories(related to ITDS and DB2 Instance) like SQLT0000.0/SQL00123.DAT, SQLT0000.0/SQL00123.DAT, and SQLT0000.0/SQL00123.INX are not getting copied and give error:

Invalid argument

Below is the output of truss command:

execve("/usr/bin/cp", 0x2FF22B9c, 0x20013678) argc: 3

sbrk(0x0000000) = 0x30002430

vmget info(0x2FF22510, 8, 16) = 0

sbrk(0x0000000) = 0x30002430

_libc_sbrk(0x0000000) = 0x30002430

getuidx(2) = 0

umask(0) = 18

umask(18) = 0

statx("/appl/ciam/test", ox2FF22A40. 175, 020) = 0

statx("SQL00027.INX", 0xFF22000, 176, 020) = 0

statx("/appl/ciam/test/SQL00027.INX", 0x2FF22938, 176, 020) Err#2 ENOENT

kopen ("SQL00027.INX", O_RDONLY|O_LARGEFILE) ERR#22 EINVAl

kwrite(2, "c p", 2) = 2

kwrite(2, ":", 2) = 2

kwrite(2, " S Q L 0 0 0 2 7 , INX", 12) = 12

kwrite(2, " : ", 2) = 2

kwrite(2, "invalid argu" , 16) = 16

kwrite(2, "\n", 1) = 1

access("/appl/ciam/test/SQL00027.INX", ) = Err#2 ENOENT

2

There are 2 answers

2
Lorinczy Zsigmond On BEST ANSWER

Try to copy one of this files individually, to find out if the problem is file-specific. If so, check if the file-path containts something problematic, like a symlink to a not-readable directory.

Also you can try 'truss' to find out the system-call that fails (open/read/write etc) -- not for beginners though.

1
RV Verma On

Yes i have tried to copy that particular files. some file SQL00xyz.INX or SQL00xyz.DAT files are copied and some giving invalid argument error