cpio(5) File Formats Manual cpio(5)Name
cpio - format of cpio archive
Description
The header structure, when the option of is not used, is:
struct {
short h_magic,
h_dev;
ushort h_ino,
h_mode,
h_uid,
h_gid;
short h_nlink,
h_rdev
h_mtime[2],
h_namesize,
h_filesize[2]'
char h_name[h_namesize rounded to word];
} Hdr;
When the option is used, the header information is described by:
sscanf(Chdr,"%6o%6o%6o%6o%6o%6o%6o%6o%11lo%6o%11lo%s",
&Hdr.h_magic, &Hdr.h_dev, &Hdr.h_ino, &Hdr.h_mode,
&Hdr.h_uid, &Hdr.h_gid, &Hdr.h_nlink, &Hdr.h_rdev,
&Longtime, &Hdr.h_namesize,&Longfile,Hdr.h_name);
The Longtime and Longfile are equivalent to Hdr.h_mtime and Hdr.h_filesize, respectively. The contents of each file are recorded in an
element of the array of varying length structures, archive, together with other items describing the file. Every instance of h_magic con-
tains the constant 070707 (octal). The items h_dev through h_mtime have meanings explained in The length of the null-terminated path name
h_name, including the null byte, is given by h_namesize.
The last record of the archive always contains the name Special files, directories, and the trailer are recorded with h_filesize equal to
zero.
See Alsocpio(1), find(1), stat(2)cpio(5)
Check Out this Related Man Page
cpio(4) Kernel Interfaces Manual cpio(4)NAME
cpio - format of cpio archive
DESCRIPTION
The header structure, when the option of is not used (see cpio(1)), is:
When the option is used, the header information is described by:
Longtime and Longfile are equivalent to and respectively. The contents of each file are recorded together with other items describing the
file. Every instance of contains the constant 070707 (octal). The items through have meanings explained in stat(2). The length of the
null-terminated path name including the null byte, is given by
The last record of the archive always contains the name Directories and the trailer are recorded with equal to zero.
It will not always be the case that and correspond to the results of but the values are always sufficient to tell whether two files in the
archive are linked to each other.
When a device special file is archived by HP-UX (using the option), contains a magic constant which is dependent upon the implementation
doing the writing. flags the device file as an HP-UX 32-bit device specifier, and contains the 32-bit device specifier (see stat(2)). If
the option is not present, special files are not archived or restored. Non-HPUX device special files are never restored.
SEE ALSO cpio(1), find(1), stat(2).
STANDARDS CONFORMANCE cpio(4)
SCO/Caldera Unixware 711
Hi Friends,
I have a cpio file which was created using relative pathnames.
the relative pathname is users/data/*
I want to restore these files to a different directory with cpio.
An example restore directory is /home/suresh
Is this possible ?
Can someone... (4 Replies)
Hi everyone.
I'm needing some help with this. I've made some backups on the same tape using cpio.
With cpio -civt < /dev/rmt/0un i could see the first backups files, but now i'm getting the next messages <<End of medum on "imput">> <<To continue, type device/file name when ready>>.
I... (3 Replies)
Hello all..
Iam New to Unix Environment. I need to copy .cpio file from CD to a Folder on Sun 5.8 Box.
Can anyone give me the commands to execute this ?..
Thanks in advance
Ron (4 Replies)
Hello,
I have been trying all sorts of combinations and been royally screwing up my filesystem in the process :rolleyes: I have a bunch of .wav files in a hierarchical album/artist etc folder structure and each has a duplicate .w4a file next to it.
All I want to do is move all the .w4a... (7 Replies)
I'm attempting to write a quick script in C++ (and a bit a novice in C++) to find files and then manipulate them, I'm using string to define variables and getline to populate. when I then use system(variable) compilation fails as follows;
findfiles.c:19: error: cannot convert `std::string' to... (7 Replies)
Hi,
I use following command to restore data from my cpio tape archive:
$cpio -icvd < /dev/rct0
But this'll restore all tape contents to the current path, what if I want only selected files from the tape, suppose I want
/home/compdir/home2/Rev83/data/PL/01/*.*
files to be restored... (8 Replies)
Hi ,
I need to copy every day about 35GB of files from one file system to another.
Im using the cp command and its toke me about 25 min.
I also tried to use dd command but its toke much more.
Is there better option ?
Regards. (6 Replies)
I have a directory x and in that I have x.cpp and a directory named Y
and in y I have y.cpp and so on. and some other files too in those directories.
How can I copy only *.cpp files in whole x directory hirarchy to a different location with the same hirarchy?
I mean the whole x directory... (7 Replies)
Hi,
I am having some issues installing Oracle 10G Release 2 on my AIX 5.2L box.
Here is what i do:
1- Extract the 10gr2 64bit cpio file using cpio -icdmv < install_file.cpio
2- Once the file is extracted, i run the rootpre.sh file. I got no error message so far everything is fine
3-... (3 Replies)
I apologize in advance if someone else has posted a similar question and I overlooked the answer in the forums, so here goes.
i'm using cpio to retrieve data from a tape and the switches i'm using are
cpio -AvicdumkB -I/dev/rct0
now the data i'm trying to restore is a specific couple of... (5 Replies)
The same cpio script has been working for years without modifications, until the last couple of nights when we get the error
Segmentation Fault - core dumped and the cpio aborts. It appears to abort in relatively the same place every time and on multiple tapes.
Do I have a bad tape drive,... (8 Replies)
Hi,
FYI I've this AIX6.1 machine that I'm telnet to using Putty. I have this oracle client file which is 1G+ that took me several hours to transfer.
I was trying to unzip 10gr2_aix5l64_client.cpio.gz.
# gunzip 10gr2_aix5l64_client.cpio.gz /usr/app/oracle
gunzip: /usr/app/oracle is a... (6 Replies)
I need a hint for reading manpage (I did rtfm really) of cpio to do this task as in the headline described. I want to put all files of a certain type, lets say all *.txt files or any other format. Spread in more than hundreds of subdirectories in one directory I would like to select them and just... (3 Replies)