One Day One Cmd

Place for playing with commands…

Day 74: $ cpio command

ODOC: About cpio
Creates and un-creates archived cpio files. And also is capable of copying files to things other than a hard disk.

Examples:

find . -print | cpio -ocv > /dev/fd0

Above command, using the find command would list all files and directories and using the cpio command copy those files listed to the floppy drive.

find . -print | cpio -dumpv /home/users/hope

In the above example the find command would find all files and directories and using the cpio command copy those files to the hope user account.

cpio -icuvd < /dev/fd0

The above command would restore the files back from the floppy.

With Regards,
S. Praveen

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: