Red Hat Linux 9 Professional Secrets [Electronic resources]

Naba Barkakati

نسخه متنی -صفحه : 341/ 204
نمايش فراداده

cpio

Purpose

Copy files in from, or out to, an archive that can be on a storage medium such as tape or a file on the disk.

Syntax

cpio [-icdv]

pattern

cpio [-ocBv]

pattern

cpio [-padm]

pattern

Options

-i extracts files whose names match the pattern.

-o copies files to archive files whose names are provided on standard input.

-p copies files to another directory on the same system.

-a resets access times of input files.

-B copies files using 5,120 bytes per record (the default is 512 bytes per record).

-c reads or writes header information as ASCII characters.

-d creates directories as needed.

-m retains the previous file-modification time.

-v prints a list of filenames.

Description

The

cpio command copies files in from, and out to, archives. There are three distinct variants of the

cpio command:

cpio -o creates an archive,

cpio -i extracts from an archive, and

cpio -p copies from one directory to another.

cpio is not that popular among Linux users;

tar is much more commonly used. However, some installation programs use

cpio during the installation process.