aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2016-11-10 13:39:41 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2016-11-10 13:39:41 +0200
commit65b51a8d17b2e382dc8c6d0fa5a83da83a34fd36 (patch)
tree5f9d6bc00f9be0dd792b9c88d0abcbead940c915
parentf968d4b7c8254eddf027b162ae2d2fc97bf572bf (diff)
downloadcpio-65b51a8d17b2e382dc8c6d0fa5a83da83a34fd36.tar.gz
cpio-65b51a8d17b2e382dc8c6d0fa5a83da83a34fd36.tar.bz2
Update docs
* doc/cpio.texi: Prominently mention, that --absolute-file-names is the default. * doc/cpio.1: Likewise.
-rw-r--r--doc/cpio.15
-rw-r--r--doc/cpio.texi38
2 files changed, 26 insertions, 17 deletions
diff --git a/doc/cpio.1 b/doc/cpio.1
index 2a68241..ae9752e 100644
--- a/doc/cpio.1
+++ b/doc/cpio.1
@@ -13,7 +13,7 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with GNU cpio. If not, see <http://www.gnu.org/licenses/>.
-.TH CPIO 1 "December 1, 2014" "CPIO" "GNU CPIO"
+.TH CPIO 1 "November 10, 2016" "CPIO" "GNU CPIO"
.SH NAME
cpio \- copy files to and from archives
.SH SYNOPSIS
@@ -287,7 +287,8 @@ Link files instead of copying them, when possible.
.SS Operation modifiers valid in copy-in and copy-out modes
.TP
.B \-\-absolute\-filenames
-Do not strip file system prefix components from the file names.
+Do not strip file system prefix components from the file names. This
+is the default.
.TP
.B \-\-no\-absolute\-filenames
Create all files relative to the current directory.
diff --git a/doc/cpio.texi b/doc/cpio.texi
index e631934..9e7f497 100644
--- a/doc/cpio.texi
+++ b/doc/cpio.texi
@@ -150,13 +150,19 @@ entries in a directory before printing the directory itself. This
limits the effects of restrictive directory permissions by printing the
directory entries in a directory before the directory name itself.
-
-
-
-Extracting an archive requires a bit more thought because cpio will not
-create directories by default. Another characteristic, is it will not
-overwrite existing files unless you tell it to.
-
+Extracting an archive requires a bit more thought. First of all, by
+default cpio extracts the files with exactly the same name as stored
+in the archive. That means that if the archive contains absolute
+paths, you will extract files to their absolute locations no matter
+what directory you're in when running the command. You can instruct
+cpio to remove leading slashes using the
+@option{--no-absolute-filenames} option. Nevertheless, the good
+practice is to always test the archive using @command{cpio -t} prior
+to extracting it.
+
+Furthermore, cpio will not create directories by default.
+Another characteristic, is it will not overwrite existing files unless
+you tell it to.
@example
@cartouche
@@ -165,7 +171,7 @@ overwrite existing files unless you tell it to.
@end example
This will retrieve the files archived in the file directory.cpio and
-place them in the present directory. The @option{-i} option extracts the
+restore them to their locations. The @option{-i} option extracts the
archive and the @option{-v} shows the file names as they are extracted.
If you are dealing with an archived directory tree, you need to use the
@option{-d} option to create directories as necessary, something like:
@@ -176,11 +182,11 @@ If you are dealing with an archived directory tree, you need to use the
@end cartouche
@end example
-This will take the contents of the archive tree.cpio and extract it to
-the current directory. If you try to extract the files on top of files
-of the same name that already exist (and have the same or later
-modification time) cpio will not extract the file unless told to do so
-by the -u option. @xref{Copy-in mode}.
+This will take the contents of the archive tree.cpio and extract it.
+If you try to extract the files on top of files of the same name that
+already exist (and have the same or later modification time) cpio will
+not extract the file unless told to do so by the -u option.
+@xref{Copy-in mode}.
In copy-pass mode, cpio copies files from one directory tree to another,
@@ -252,7 +258,8 @@ Append to an existing archive.
@itemx --reset-access-time
Reset the access times of files after reading them.
@item --absolute-filenames
-Do not strip file system prefix components from the file names.
+Do not strip file system prefix components from the file names. This
+is the default.
@item --no-absolute-filenames
Strip file system prefix components from the file names before storing
them to the archive.
@@ -331,7 +338,8 @@ The following options can be used in copy-in mode:
@table @option
@item --absolute-filenames
-Do not strip file system prefix components from the file names.
+Do not strip file system prefix components from the file names. This
+is the default.
@item --no-absolute-filenames
Create all files relative to the current directory.
@item --block-size=@var{block-size}

Return to:

Send suggestions and report system problems to the System administrator.