ggnnuuccppiioo -- Command

Archiving/backup utility
_C_o_p_y-_i_n _m_o_d_e: ccppiioo {-oo|--ccrreeaattee} [-00aaccvvAABBLLVV] [-CC _b_y_t_e_s] [-HH _f_o_r_m_a_t] [-MM
_m_e_s_s_a_g_e] [-OO [[_u_s_e_r@]_h_o_s_t:]_a_r_c_h_i_v_e] [-FF [[_u_s_e_r@]_h_o_s_t:]_a_r_c_h_i_v_e] [--
file=[[_u_s_e_r@]_h_o_s_t:]_a_r_c_h_i_v_e] [--ffoorrmmaatt=_f_o_r_m_a_t] [--mmeessssaaggee=_m_e_s_s_a_g_e] [--nnuullll]
[--rreesseett-aacccceessss-ttiimmee] [--vveerrbboossee] [--ddoott] [--aappppeenndd] [--bblloocckk-ssiizzee=bblloocckkss]
[--ddeerreeffeerreennccee] [--iioo-ssiizzee=_b_y_t_e_s] [--vveerrssiioonn] < _n_a_m_e-_l_i_s_t [> _a_r_c_h_i_v_e]

_C_o_p_y-_o_u_t _m_o_d_e: ccppiioo {-ii|--eexxttrraacctt} [-bbccddffmmnnrrttssuuvvBBSSVV] [-CC _b_y_t_e_s] [-EE _f_i_l_e]
[-HH _f_o_r_m_a_t] [-MM _m_e_s_s_a_g_e] [-RR [_u_s_e_r][:.][_g_r_o_u_p]] [-II [[_u_s_e_r@]_h_o_s_t:]_a_r_c_h_i_v_e]
[-FF [[_u_s_e_r@]_h_o_s_t:]_a_r_c_h_i_v_e] [--ffiillee=[[_u_s_e_r@]_h_o_s_t:]_a_r_c_h_i_v_e] [--mmaakkee-
ddiirreeccttoorriieess] [--nnoonnmmaattcchhiinngg] [--pprreesseerrvvee-mmooddiiffiiccaattiioonn-ttiimmee] [--nnuummeerriicc-uuiidd-
ggiidd] [--rreennaammee] [--lliisstt] [--sswwaapp-bbyytteess] [--sswwaapp] [--ddoott] [--uunnccoonnddiittiioonnaall]
[--vveerrbboossee] [--bblloocckk-ssiizzee=_b_l_o_c_k_s] [--sswwaapp-hhaallffwwoorrddss] [--iioo-ssiizzee=_b_y_t_e_s] [--
ppaatttteerrnn-ffiillee=_f_i_l_e] [--ffoorrmmaatt=_f_o_r_m_a_t] [--oowwnneerr=[_u_s_e_r][:.][_g_r_o_u_p]] [--nnoo-
pprreesseerrvvee-oowwnneerr] [--mmeessssaaggee=_m_e_s_s_a_g_e] [--vveerrssiioonn] [_p_a_t_t_e_r_n...] [< _a_r_c_h_i_v_e]

_C_o_p_y-_t_h_r_o_u_g_h _m_o_d_e: ccppiioo {-pp|--ppaassss-tthhrroouugghh} [-00aaddllmmuuvvLLVV] [-RR
[_u_s_e_r][:.][_g_r_o_u_p]] [--nnuullll] [--rreesseett-aacccceessss-ttiimmee] [--mmaakkee-ddiirreeccttoorriieess] [--
lliinnkk] [--pprreesseerrvvee-mmooddiiffiiccaattiioonn-ttiimmee] [--uunnccoonnddiittiioonnaall] [--vveerrbboossee] [--ddoott]
[--ddeerreeffeerreennccee] [--oowwnneerr=[_u_s_e_r][:.][_g_r_o_u_p]] [--nnoo-pprreesseerrvvee-oowwnneerr] [--
vveerrssiioonn] _d_e_s_t_i_n_a_t_i_o_n-_d_i_r_e_c_t_o_r_y < _n_a_m_e-_l_i_s_t

ggnnuuccppiioo is  the GNU version  of the archive  utility ccppiioo. It  copies files
into or out  of a ccppiioo or ttaarr archive,  which is a file that contains other
files  plus  information   about  them,  such  as  their  pathname,  owner,
timestamps, and access permissions.  The archive can be another file on the
disk, a magnetic tape, or a pipe.

ggnnuuccppiioo has three operating modes.

_C_o_p_y-_o_u_t _M_o_d_e
     ggnnuuccppiioo copies files into an archive.   It reads a list of file names,
     one per line, from the standard input, and writes the archive onto the
     standard output.

_C_o_p_y-_i_n _M_o_d_e
     ggnnuuccppiioo copies files from  an archive or lists the archive's contents.
     It reads the archive from the standard input.  Any non-option command-
     line arguments are shell wild-card patterns; only files in the archive
     whose names  match one or more  of those patterns are  copied from the
     archive.  Unlike  in the  shell, an  initial `.' in  a file  name does
     match a wildcard  at the start of a pattern,  and a `/' in a file name
     can match wildcards.  If the command line contains no pattern, ggnnuuccppiioo
     extracts all files.

_C_o_p_y-_p_a_s_s _M_o_d_e
     ggnnuuccppiioo  copies  files  from  one  directory  tree to  another.   This
     combines  the copy-out  and copy-in  steps  without actually  using an
     archive.  It reads the list of  files to copy from the standard input;
     the  directory into  which it  copies  them is  given as  a non-option
     argument.

ggnnuuccppiioo  supports the  following archive  formats:  binary, old  ASCII, new
ASCII, ccrrcc, old ttaarr, and POSIX.1 ttaarr. The binary format is obsolete because
it  encodes information  about the  files  in a  way that  is not  portable
between different machine  architectures.  The old ASCII format is portable
between different  machine architectures,  but should  not be used  on file
systems with  more than  65536 i-nodes.  The  new ASCII format  is portable
between different  machine architectures and  can be used on  any size file
system, but is not supported by all versions of ccppiioo; currently, it is only
supported by  GNU and UNIX System  V R4.  The ccrrcc  format resembles the new
ASCII  format, but  also contains  a  checksum for  each file  that ggnnuuccppiioo
calculates when creating an archive and verifies when the file is extracted
from the archive.

ttaarr format is  provided for compatability with the command  ttaarr. It can not
be used to archive a file  whose name exceeds 100 characters, and cannot be
used to archive block or character devices.  The POSIX.1 ttaarr format can not
be used to archive a file whose name exceeds 255 characters (less unless it
has a `/' in just the right place).

By default,  ggnnuuccppiioo creates binary archives,  for compatibility with older
ccppiioo  programs.   When  extracting  from  archives,  ggnnuuccppiioo  automatically
recognizes the kind of archive it is reading, and can read archives created
on machines with a different byte-order.

_O_p_t_i_o_n_s
ggnnuuccppiioo recognizes  the following  command-line options.  Not  every option
applies to every  mode.  You can prefix the long-named  options with an `+'
as  well  as  with  an  `--',  for compatibility  with  previous  releases.
Eventually, support  for `+'  will be  removed, because it  is incompatible
with the POSIX Standard.

-00
--nnuullll
     In copy-out and copy-pass modes,  read a list of file names terminated
     by a  null character  instead of a  newline.  This permits  ggnnuuccppiioo to
     archive files whose names contain newlines.

-aa
--rreesseett-aacccceessss-ttiimmee
     Reset the  access times of files  after reading them, so  that it does
     not look like they have just been read.

-AA
--aappppeenndd
     Append  to an  existing archive.   Only works  in copy-out  mode.  The
     archive must be a disk file specified with the options -OO or -FF.

-bb
--sswwaapp
     In copy-in  mode, swap both halfwords of words  and bytes of halfwords
     in the data.  Equivalent to the option -ssSS. Use this option to convert
     32-bit integers between big-endian and little-endian machines.

-BB   Set the I/O  block size to 5,120 bytes.  Initially,  the block size is
     512 bytes.

--bblloocckk-ssiizzee=_b_l_o_c_k_s
     SSeett tthhee bblloocckk ssiizzee ttoo _b_l_o_c_k_sx512 bytes.

-cc   Use the old portable (ASCII) archive format.

-CC _s_i_z_e

--iioo-ssiizzee=_s_i_z_e
     Set the I/O block size to _s_i_z_e bytes.

-dd
--mmaakkee-ddiirreeccttoorriieess
     Create leading directories where needed.

-EE ffiillee
--ppaatttteerrnn-ffiillee=_f_i_l_e
     In copy-in mode, read  from _f_i_l_e additional patterns that specify file
     names to extract or list.  ggnnuuccppiioo treats the lines of _f_i_l_e as if they
     had been non-option arguments to ggnnuuccppiioo.

-ff
--nnoonnmmaattcchhiinngg
     Copy only the files that do _n_o_t match any of the given patterns.

-FF
--ffiillee=_a_r_c_h_i_v_e
     Read to or write from _a_r_c_h_i_v_e instead of the standard input or output.

--ffoorrccee-llooccaall
     With -FF, -II, or -OO, take the archive file name to be a local file even
     if it contains a colon (which ordinarily names a remote host).

-HH _f_o_r_m_a_t
--ffoorrmmaatt=_f_o_r_m_a_t
     Use archive format _f_o_r_m_a_t. The valid formats are listed below; ggnnuuccppiioo
     also recognizes these names  if given in capital letters.  The default
     in copy-in mode is to  detect automatically the archive format, and in
     copy-out mode is bbiinn.

     bbiinn  The obsolete binary format.

     ooddcc  The old (POSIX.1) portable format.

     nneewwcc The new (SVR4)  portable format, which supports file systems that
          have more than 65536 i-nodes.

     ccrrcc  The new (SVR4) portable format with a checksum added.

     ttaarr  The old ttaarr format.

     uussttaarr
          The POSIX.1 ttaarr  format.  Also recognizes GNU ttaarr archives, which
          are similar but not identical.

-ii
--eexxttrraacctt
     Run in copy-in mode.

-II _a_r_c_h_i_v_e
     Archive file name to use instead of standard input.

-kk   This option exists only for compatibility with other versions of ccppiioo.
     It is ignored.

-ll
--lliinnkk
     Whenever possible, link files instead of copying them.

-LL
--ddeerreeffeerreennccee
     Dereference symbolic links -- that  is, copy the files that they point
     to instead of copying the links.

-mm
--pprreesseerrvvee-mmooddiiffiiccaattiioonn-ttiimmee
     Retain previous file-modification times when creating files.

-MM _m_e_s_s_a_g_e
--mmeessssaaggee=_m_e_s_s_a_g_e
     Print _m_e_s_s_a_g_e when ggnnuuccppiioo reaches the  end of a volume of the back-up
     medium (such as a tape or a floppy disk), to prompt the user to insert
     a new  volume.  If  _m_e_s_s_a_g_e contains  the string %dd,  ggnnuuccppiioo replaces
     that string with the number of the current volume (starting at one).

-nn
--nnuummeerriicc-uuiidd-ggiidd
     In the verbose table of contents listing, show the numeric UID and GID
     instead of translating them into names.

--nnoo-pprreesseerrvvee-oowwnneerr
     In copy-in  and copy-pass  modes, do not  change the ownership  of the
     files: leave  them owned by the  user who extracts them.   This is the
     default  for non-root  users, so  that users on  System-V UNIX  do not
     inadvertantly give away files.

-oo
--ccrreeaattee
     Run in copy-out mode.

-OO _a_r_c_h_i_v_e
     Write output into _a_r_c_h_i_v_e instead of to the standard output.

-pp
--ppaassss-tthhrroouugghh
     Run in copy-pass mode.

-rr
--rreennaammee
     Interactively rename files.

-RR [_u_s_e_r][:.][_g_r_o_u_p]
--oowwnneerr [_u_s_e_r][:.][_g_r_o_u_p]
     In  copy-out  and copy-pass  modes,  set the  ownership  of all  files
     created to _u_s_e_r and _g_r_o_u_p. Either the user or the group, or both, must
     be present.  If  the group is omitted but the  `:' or `.' separator is
     given, ggnnuuccppiioo  uses the user's login group.   Only the super-user can
     change files' ownership.

-ss
--sswwaapp-bbyytteess
     In copy-in  mode, swap the bytes  of each halfword (pair  of bytes) in
     the files.

-SS
--sswwaapp-hhaallffwwoorrddss
     In copy-in mode,  swap the halfwords of each word  (four bytes) in the
     files.

-tt
--lliisstt
     Print a table of contents of the input.

-uu
--uunnccoonnddiittiioonnaall
     Replace all  files, without asking  whether to replace  existing newer
     files with older files.

-vv
--vveerrbboossee
     List  the files  processed.   When used  with  the option  -tt, give  a
     listing that resembles  the output of the command llss  -ll. In a verbose
     table of  contents of  a uussttaarr  archive, user and  group names  in the
     archive that  do not  exist on  the local system  are replaced  by the
     names that correspond locally to the numeric UID and GID stored in the
     archive.

-VV --ddoott
     Print a `.' for each file processed.

--vveerrssiioonn
     Print the number  of the version of ggnnuuccppiioo that  you are now running,
     and exit.

_E_x_a_m_p_l_e_s
The  following  command copies  all  files and  directories  listed by  the
command ffiinndd and copies them into the archive nneewwffiillee.ccppiioo:

    find . -print | cpio -oc > ../newfile.cpio

The following command reads  the ccppiioo archive nneewwffiillee.ccppiioo and extracts all
files whose names match the patterns mmeemmoo/aall or mmeemmoo/bb*:

    cpio -icdv "memo/al" "memo/b*" <../newfile.cpio

Note that  the -dd option forces  ccppiioo to create the  sub-directory mmeemmoo and
write the files into it.  Otherwise, the files would have been written into
the current directory.  Option -vv causes  ccppiioo to display each file name as
it is extracted from the archive.

The  following  commands perform  a  multi-volume backup  of  all files  on
mounted  filesystem  /vv to  the  character-special  (i.e., ``raw'')  floppy
device /ddeevv/rrffhhaa00:

    su root
    cd /v
    find . -print | cpio -ocv >/dev/rfha0

If the ccppiioo archive exceeds one floppy disk, you will be prompted to insert
another.

_S_e_e _A_l_s_o
ccoommmmaannddss, ccppiioo, ggttaarr

_N_o_t_e_s
COHERENT does  not yet support networking.  The  above descriptions of host
addressing do not yet apply.

ggnnuuccppiioo is released under  the conditions of the Free Software Foundation's
``copyleft''.   Full source  code is  available  through the  Mark Williams
bulletin board.
