cpio Flashcards

1
Q

cpio

A

GNU cpio copies files between archives and directories.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

cpio -o < listofnames > archive

A

This command copies files from the listofnames into the archive by using the -o option.

-o, –create, Creates the archive.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

cpio -i < archive

A

This command extracts files from the archive by using the -i option.

-i, –extract, Extracts files from the archive.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

cpio -p /home/user/namelist < listofnames.txt

A

This command reads a list of file names from stdin and copies them to a specified directory.

-p, –pass-through, Runs cpio in pass-through mode.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

cat /etc/ | cpio -ov -H tar > /home/user/etcfiles.tar

A

This command creates a tar archive file by using -H option to specify a specific format to use.

-H, –format=FORMAT, Use give archive FORMAT.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

cpio -iv -F < /home/user/etcfiles.tar

A

This file extracts a specific archive file with -F instead of using stdin.

-F, –file=ARCHIVE-FILE, Use this ARCHIVE-FILE instead of standard input or standard output.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

cpio -it -F < /home/user/etcfiles.tar

A

This command lists etcfiles.tar by using the -t command.

-t, –list, Print a table of contents of the input.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly