Operating System - HP-UX
1820734 Members
3286 Online
109627 Solutions
New Discussion юеВ

find or cpio error? Where can find errno definition

 
George Liu_2
Frequent Advisor

find or cpio error? Where can find errno definition

Given the problem below, how to fix it? Thanks.

# find . -xdev -depth -print|cpio -pxdm /mnt
Cannot create directory for (errno:22)
Cannot create directory for (errno:22)
# ls -l newconfig/etc/X11/Xconsoles
-r--r--r-- 1 bin bin 291 May 30 1996 newconfig/etc/X11/Xconsoles
# whoami
root
11 REPLIES 11
A. Clay Stephenson
Acclaimed Contributor

Re: find or cpio error? Where can find errno definition

Hi George:

For the errno definitions look in /usr/include/sys/errno.h

22 == EINVAL Invalid argument
If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: find or cpio error? Where can find errno definition

Hi George:

/usr/include/sys/errno.h contains the mnemonics and short descriptions for standard HP-UX errors.

Error-22 is EINVAL which is "invalid argument".

...JRF...
George Liu_2
Frequent Advisor

Re: find or cpio error? Where can find errno definition

Pls don't bother the second question. Thanks.

#define EINVAL 22 /* Invalid argument */
MANOJ SRIVASTAVA
Honored Contributor

Re: find or cpio error? Where can find errno definition

Hi George


Error No 22 is invalid argument check /usr/inculde/sys/errno.h for other too.
I think there is some issue with command , though it is working in my my servers . Try givivng the command again

Manoj Srivastava
linuxfan
Honored Contributor

Re: find or cpio error? Where can find errno definition

Hi George,

I am confused seeing the error,
because Xconsoles is a file and you can infact do a ls -al at the new location and if cpio is trying to create a directory, it should have given an errno:20 (which is from /usr/include/sys/errno.h --> ENOTDIR - Not a directory).

Are you sure you didn't mistype when entering the question?

-Ramesh
They think they know but don't. At least I know I don't know - Socrates
George Liu_2
Frequent Advisor

Re: find or cpio error? Where can find errno definition

Ramesh,
Thank you. Yes. I just pasted the messages from the screen. There should be no typo. Thanks.

--George
Victor BERRIDGE
Honored Contributor

Re: find or cpio error? Where can find errno definition

Hi,
What about giving a try at:
find . -xdev |cpio -pxdmulv /mnt
?

All the best

Victor
Denver Osborn
Honored Contributor

Re: find or cpio error? Where can find errno definition

Hi George,

We tried to duplicate the issue over the phone but it decided to work!

I would recommend installing the find patch PHCO_15262 on the system where the problem showed up and didn't have this patch already.

Hope this helps
-denver
George Liu_2
Frequent Advisor

Re: find or cpio error? Where can find errno definition

option l in cpio makes linking rather than copying. It is not my initial intention. Thanks anyway.
George Liu_2
Frequent Advisor

Re: find or cpio error? Where can find errno definition

Denver,

Problem remains after I installed patch PHCO_15262.

--George
linuxfan
Honored Contributor

Re: find or cpio error? Where can find errno definition

Hi George,

Just out of curiosity, can you try tar.

tar cf . | (cd /mnt ; tar xf -)

See if you get any errors

-Ramesh
They think they know but don't. At least I know I don't know - Socrates