cpio COMMAND:
cpio command creates and un-creates archived cpio files. It is capable of copying files to things other than a hard disk. Probably, this command is also used to backup and restore files.
SYNTAX:
The Syntax is
cpio [options]
OPTIONS:
-i
Extracts files from the standard input.
-o
Reads the standard input to obtain a list of path names and copies those files onto the standard output.
-p
Reads the standard input to obtain a list of path names of files.
-c
Read or write header information in ASCII character form for portability.
-d
Creates directories as needed.
-u
Copy unconditionally (normally, an older file will not replace a newer file with the same name).
-m
Retain previous file modification time. This option is ineffective on directories that are being copied.
-v
Verbose.Print a list of file names.
EXAMPLE:
find . -print | cpio -ocv > /dev/fd0
Find list of files and directories and then copy those to floppy drive.
find . -print | cpio -dumpv /home/nirmala
Find list of files and directories and then copy or backup those to user.
cpio -icuvd < /dev/fd0
Restore the files back from the floppy.
Find LINUX Commands... Hope you enjoy this tutorial. We welcome your Valuable feedbacks or suggestions on this LINUX / UNIX cmd reference. This is a copyright content.