From a53fb05c9554f8b1da10da26e836011a271d1ce1 Mon Sep 17 00:00:00 2001 From: FlyingJester Date: Tue, 10 May 2016 10:01:53 -0700 Subject: [PATCH 1/4] cpio: add page --- pages/common/cpio.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 pages/common/cpio.md diff --git a/pages/common/cpio.md b/pages/common/cpio.md new file mode 100644 index 0000000000..ea00554a3c --- /dev/null +++ b/pages/common/cpio.md @@ -0,0 +1,16 @@ +# cpio + +> Archiving utility. + +- Create an archive from files + +`echo "{{file1}} {{file2}} {{file3}}" | cpio -ov > {{archive.cpio}}` + +- Create an archive from a directory + +`find {{directory}} | cpio -ov > {{archive.cpio}}` + +- Extract an archive + +`cpio -idv < {{archive.cpio}}` + From 1a8f54c3753df6fda7671ce31228a51724100ade Mon Sep 17 00:00:00 2001 From: Agniva De Sarker Date: Wed, 7 Sep 2016 23:42:01 +0530 Subject: [PATCH 2/4] cpio: Update description to match flags --- pages/common/cpio.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pages/common/cpio.md b/pages/common/cpio.md index ea00554a3c..f6667adebb 100644 --- a/pages/common/cpio.md +++ b/pages/common/cpio.md @@ -1,16 +1,15 @@ # cpio -> Archiving utility. +> Copies files to and from archives. -- Create an archive from files +- Take a list of file names from standard input and creates an archive from them: -`echo "{{file1}} {{file2}} {{file3}}" | cpio -ov > {{archive.cpio}}` +`echo "{{file1}} {{file2}} {{file3}}" | cpio -o > {{[o]utput_archive.cpio}}` -- Create an archive from a directory +- Create an archive containing all the files and folders in a directory in [v]erbose mode: -`find {{directory}} | cpio -ov > {{archive.cpio}}` +`find {{path/to/directory}} | cpio -ov > {{[o]utput_archive.cpio}}` -- Extract an archive - -`cpio -idv < {{archive.cpio}}` +- Extract files from an archive, generating [d]irectories where needed, in [v]erbose mode: +`cpio -idv < {{[i]nput_archive.cpio}}` From 1ecdf192380b1fdaf429ccae0e25ff72d0ee076a Mon Sep 17 00:00:00 2001 From: Agniva De Sarker Date: Tue, 13 Sep 2016 12:05:19 +0530 Subject: [PATCH 3/4] cpio: add detailed description about archive format --- pages/common/cpio.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pages/common/cpio.md b/pages/common/cpio.md index f6667adebb..e038b01a5a 100644 --- a/pages/common/cpio.md +++ b/pages/common/cpio.md @@ -1,15 +1,16 @@ # cpio -> Copies files to and from archives. +> Copies files in and out of archives. +> Supports following archive formats: binary, old ASCII, new ASCII, crc, HPUX binary, HPUX old ASCII, old tar, and POSIX.1 tar. -- Take a list of file names from standard input and creates an archive from them: +- Take a list of file names from standard input and copy them [o]ut to an archive in binary format: -`echo "{{file1}} {{file2}} {{file3}}" | cpio -o > {{[o]utput_archive.cpio}}` +`echo "{{file1}} {{file2}} {{file3}}" | cpio -o > {{archive.cpio}}` -- Create an archive containing all the files and folders in a directory in [v]erbose mode: +- Copy [o]ut all files and folders in a directory to an archive, in [v]erbose mode: -`find {{path/to/directory}} | cpio -ov > {{[o]utput_archive.cpio}}` +`find {{path/to/directory}} | cpio -ov > {{archive.cpio}}` -- Extract files from an archive, generating [d]irectories where needed, in [v]erbose mode: +- Copy [i]n all files from an archive, generating [d]irectories where needed, in [v]erbose mode: -`cpio -idv < {{[i]nput_archive.cpio}}` +`cpio -idv < {{archive.cpio}}` From 143394bda41df2577ca185ab72b990bcb2e3e55b Mon Sep 17 00:00:00 2001 From: Agniva De Sarker Date: Wed, 14 Sep 2016 22:18:01 +0530 Subject: [PATCH 4/4] cpio: Re-modify descriptions to match flags - Also fixed a minor grammar error --- pages/common/cpio.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/common/cpio.md b/pages/common/cpio.md index e038b01a5a..1ce66e6000 100644 --- a/pages/common/cpio.md +++ b/pages/common/cpio.md @@ -1,16 +1,16 @@ # cpio > Copies files in and out of archives. -> Supports following archive formats: binary, old ASCII, new ASCII, crc, HPUX binary, HPUX old ASCII, old tar, and POSIX.1 tar. +> Supports the following archive formats: custom binary, old ASCII, new ASCII, crc, HPUX binary, HPUX old ASCII, old tar, and POSIX.1 tar. -- Take a list of file names from standard input and copy them [o]ut to an archive in binary format: +- Take a list of file names from standard input and add them [o]nto an archive in binary format: `echo "{{file1}} {{file2}} {{file3}}" | cpio -o > {{archive.cpio}}` -- Copy [o]ut all files and folders in a directory to an archive, in [v]erbose mode: +- Copy all files and folders in a directory and add them [o]nto an archive, in [v]erbose mode: `find {{path/to/directory}} | cpio -ov > {{archive.cpio}}` -- Copy [i]n all files from an archive, generating [d]irectories where needed, in [v]erbose mode: +- P[i]ck all files from an archive, generating [d]irectories where needed, in [v]erbose mode: `cpio -idv < {{archive.cpio}}`