Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

cpio(5) [ultrix man page]

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 Also
       cpio(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 -c option of cpio(1) 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 -c 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, respec- tively. 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 contains the constant 070707 (octal). The items h_dev through h_mtime have meanings explained in stat(2). 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 TRAILER!!! Special files, directories, and the trailer are recorded with h_file- size equal to zero. RELATED INFORMATION
cpio(1), find(1), stat(2) delim off cpio(4)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

cpio restore - relative pathname

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)
Discussion started by: sureshy
4 Replies

2. UNIX for Dummies Questions & Answers

cpio problem

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)
Discussion started by: livortiz
3 Replies

3. UNIX for Dummies Questions & Answers

How to Copy Contents from CD to Hard disk

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)
Discussion started by: vr76413
4 Replies

4. UNIX for Dummies Questions & Answers

any idea to copy directory structure

I want to copy the durectory structure having subdirectories in it ... would be greatful if anyone could let me know .. thanks in advance (6 Replies)
Discussion started by: myelvis
6 Replies

5. UNIX for Dummies Questions & Answers

Selective, recursive file diddling!

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)
Discussion started by: dinalt
7 Replies

6. Programming

using find in C

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)
Discussion started by: gefa
7 Replies

7. UNIX for Dummies Questions & Answers

Selective restore from a cpio tape archive

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)
Discussion started by: tayyabq8
8 Replies

8. Shell Programming and Scripting

Faster then cp ?

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)
Discussion started by: yoavbe
6 Replies

9. UNIX for Advanced & Expert Users

copy files with diresctory hirarchy

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)
Discussion started by: muru
7 Replies

10. AIX

Enabling 64 bit

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)
Discussion started by: Netghost
3 Replies

11. UNIX and Linux Applications

cpio question

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)
Discussion started by: HNelson
5 Replies

12. UNIX for Dummies Questions & Answers

Segmentaion Fault - Core dumped during cpio

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)
Discussion started by: golfs4us
8 Replies

13. HP-UX

cpio.cat.z files????

what are cpio.cat.z files??? Can I delete them??? (3 Replies)
Discussion started by: ldaliosmane
3 Replies

14. AIX

unzipping _client.cpio.gz issue

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)
Discussion started by: pilotHans
6 Replies

15. Shell Programming and Scripting

Cpio all *.txt-files out of folders to just one directory

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)
Discussion started by: 1in10
3 Replies