icon Top 9 categories map      RocketAware >


Tips: Browse or Search all pages for efficient awareness of more than 6000 of the most popular reusable and open source applications, functions, libraries, and FAQs.

The "RKT couplings" below include links to source code, updates, additional information, advice, FAQs, and overviews.


Search all pages


By activity
Professions, Sciences, Humanities, Business, ...

User Interface
Text-based, GUI, Audio, Video, Keyboards, Mouse, Images,...

Text Strings
Conversions, tests, processing, manipulation,...

Integer, Floating point, Matrix, Statistics, Boolean, ...

Algorithms, Memory, Process control, Debugging, ...

Stored Data
Data storage, Integrity, Encryption, Compression, ...

Networks, protocols, Interprocess, Remote, Client Server, ...

Hard World
Timing, Calendar and Clock, Audio, Video, Printer, Controls...

File System
Management, Filtering, File & Directory access, Viewers, ...


RocketLink!--> Man page versions: OpenBSD FreeBSD Others

CTM(1)                     OpenBSD Reference Manual                     CTM(1)

     ctm - source code mirror program

     ctm [-cFklquv] [-b basedir] [-B backup-file] [-e include-regex] [-t
         tar-command] [-T tmpdir] [-V level] [-x exclude-regex] file ...

     ctm was originally ``Cvs Through eMail'', but now instead it seems more
     fitting to call it ``Current Through eMail''.

     ctm is now meant to be the definitive way to make and apply a delta be-
     tween two versions of a directory tree.

     There are two parts to this, making the delta and applying it.  These are
     two entirely different things.

     To apply a CTM delta, you pass it to the ctm command.  You can pass a CTM
     delta on stdin, or you can give the filename as an argument.  If you do
     the latter, you make life a lot easier for yourself, since the program
     can accept gzip'ed files and since it will not have to make a temporary
     copy of your file.  You can specify multiple deltas at one time, they
     will be processed one at a time.  Deltas that are already applied will be

     The ctm command runs in a number of passes.  It will process the entire
     input file in each pass, before commencing with the next pass.

     Before working on a file name ctm first checks for the existence of the
     file name.ctm. If this file exists, ctm works on it instead.

     Pass 1 will verify that the input file is OK.  The syntax, the data and
     the global MD5 checksum will be checked.  If any of these fail, ctm will
     simply reject the input file.

     Pass 2 will validate that the directory tree is in the state expected by
     the CTM delta.  This is done by looking for files and directories which
     should/should not exist and by checking the MD5 checksums of files.

     If a backup-file had been specified using the -B option, all files that
     would be modified by this ctm invocation are backed up to this file using
     the archiver command specified by the -t option.  The default archiver
     command is tar -rf %s -T -.

     Pass 3 will actually apply the delta.

     The list of files that would be modified by ctm is subject to filtering
     regular expressions specified using the -e and -x options.  The -e and -x
     options are applied in order of appearance on the command line.  The last
     filter that matched a given file name determines whether the file would
     be operated on or left alone by ctm.

     ctm will extract the file hierarchy below its working directory.  Abso-
     lute filenames or filenames containing references through ``.'' or ``..''
     are explicitly prohibited as a security measure.


     -b basedir
             Prepend the path basedir to every filename.

     -B backup-file
             Backup all files that would be modified by this CTM run to
             backup-file. If any filters are specified using the -e and -x op-
             tions, then the final set of files backed up are those that would
             be modified by CTM after the filters are applied.

     -c      Check it out, don't do anything.

     -e regular_expression
             Match each name in the CTM file against regular_expression, and
             if it matches process the file, otherwise leave it alone.  There
             may be any number of these options.  Use of this option disables
             the .ctm_status sequence number checks.  For example, the expres-
             sion ^usr.sbin/ctm for example, will select the usr.sbin/ctm
             source directory and all pathnames under it.

             Pathnames can be disabled from being considered by CTM using the
             -x option.

     -F      Force.

     -k      Keep files and directories and don't remove them even if the CTM
             file specifies they are to be removed.  If the -B option is spec-
             ified, these files and directories will not be backed up.

     -l      List files that would be modified by this invocation of CTM and
             the actions that would be performed on them.  Use of the -l op-
             tion disables the .ctm_status checks and integrity checks on the
             source tree being operated on.  The -l option can be combined
             with the -e and -x options to determine which files would be mod-
             ified by the given set of command line options.

     -q      Tell us less.

     -t tar-command
             Use tar-command instead of the default archiver tar. This option
             takes effect only if a backup file had been specified using the
             -B option.  A %s in the tar command will be replaced by the name
             of the backup file.

     -T tmpdir
             Put temporary files under tmpdir.

     -u      Set the modification time of created and modified files to the
             CTM delta creation time.

     -v      Tell us more.

     -V level
             Tell us more.  level is the level of verbosity.

     -x regular_expression
             Match each name in the CTM file against regular_expression and if
             it matches, leave the file alone.  There may be any number of
             these options.  Use of this option disables the .ctm_status se-
             quence number checks.

             Pathnames can be selected for CTM's consideration using the -e

     TMPDIR, if set to a pathname, will cause ctm to use that pathname as the
     location of temporary file.  See tempnam(3) for more details on this.
     The same effect may be achieved with the -T flag.

     .ctm_status contains the sequence number of the last CTM delta applied.
     Changing or removing this file will greatly confuse ctm.

     Using the -e and -x options can update a partial subset of the source
     tree and causes sources to be in an inconsistent state.  It is assumed
     that you know what you are doing when you use these options.

           cd ~cvs
           /usr/sbin/ctm ~ctm/cvs-*

     To extract and patch all sources under `lib'

           cd ~/lib-srcs
           /usr/sbin/ctm -e '^lib' ~ctm/src-cur*

     Numerous messages, hopefully self-explanatory.  The ``noise level'' can
     be adjusted with the -q, -v and -V options.

     ctm_rmail(1),  ctm(5)

     Initial trials were run during the work on FreeBSD 1.1.5, and many bugs
     and methods were hashed out.  The ctm command appeared in FreeBSD 2.1.

     The CTM system has been designed and implemented by Poul-Henning Kamp
     <phk@FreeBSD.org>. Joerg Wunsch <joerg@FreeBSD.org> wrote this man page.

OpenBSD 2.6                      Mar 25, 1995                                3

Source: OpenBSD 2.6 man pages. Copyright: Portions are copyrighted by BERKELEY
SOFTWARE DESIGN, INC., The Regents of the University of California, Massachusetts
Institute of Technology, Free Software Foundation, FreeBSD Inc., and others.

(Corrections, notes, and links courtesy of RocketAware.com)

[Detailed Topics]
FreeBSD Sources for ctm(1)
OpenBSD sources for ctm(1)

[Overview Topics]

Up to: File Transfer and Distribution - Protocols and Methods of transfering files and directories, distributing and installing software. (file collections and archives, FTP, cvsup, NFS, et al.)
Up to: File and Version Management - RCS, CVS, distribution, etc.

RocketLink!--> Man page versions: OpenBSD FreeBSD Others

Rapid-Links: Search | About | Comments | Submit Path: RocketAware > ctm.1/
RocketAware.com is a service of Mib Software
Copyright 1999, Forrest J. Cavalier III. All Rights Reserved.
We welcome submissions and comments