NAME
	listcp, listpseg -- browse NILFS checkpoints/segments

SYNOPSIS

	listcp [options..] <device>
	listcp [options..] <directory>

	listpseg <device>
	listpseg <directory>

DESCRIPTION

Listcp and listpseg are sub commands to view the NILFS checkpoints and
the partial segments respectively.  They invoke inspect and format its
output.

The following options are available for listcp:

 -l  Use long listing format.

 -e  Print the number of seconds from the epoch instead of formatted
     date string.

 -s  List only checkpoints having sketch data.

 -t  Show sketch.

 -b  Browse checkpoints.
     Installing autofs is recommended; see misc/autofs/README.

 -h  Show help message.


Examples:

Without optional arguments, listcp simply lists block numbers of
segments having a major checkpoint.  These numbers identify snapshots
and are used to mount them (see docs/mount-options.txt for details).

At present, listcp requires root privilege because it scans the target
device directly through the inspect command.  If the target device is
readable by user, ``sudo'' commands in the following examples are
omissible.

 hack> sudo listcp /project/nilfs
 1 9 17 21 29 33 37 41 49 1025 3072 5120 7168 8192 8850 9048 9052 9056
 9216 9358 9372 9378 9486 9503 9507 9511 9515 9519 9533 11264 12288 
 ...


When giving the -l option, listcp works like the listcp internal
command of inspect. 

 hack> sudo listcp -l /project/nilfs
         1     8 Fri Feb 10 15:18:36 2006 MajorCP|LogiBegin|LogiEnd    0
         9     8 Fri Feb 10 15:35:47 2006 MajorCP|LogiBegin|LogiEnd    0
        17     4 Fri Feb 10 15:35:57 2006 MajorCP|LogiBegin|LogiEnd    0
        21     8 Fri Feb 10 15:36:17 2006 MajorCP|LogiBegin|LogiEnd    0
        29     4 Fri Feb 10 15:36:28 2006 MajorCP|LogiBegin|LogiEnd    0
        33     4 Fri Feb 10 15:36:44 2006 MajorCP|LogiBegin|LogiEnd    0
        37     4 Fri Feb 10 15:37:09 2006 MajorCP|LogiBegin|LogiEnd   19
        ...


Specify the -t option and the -l option together to display sketch
data.

 hack> sudo listcp -lt /project/nilfs
         1     8 Fri Feb 10 15:18:36 2006
         9     8 Fri Feb 10 15:35:47 2006
        17     4 Fri Feb 10 15:35:57 2006
        21     8 Fri Feb 10 15:36:17 2006
        29     4 Fri Feb 10 15:36:28 2006
        33     4 Fri Feb 10 15:36:44 2006
        37     4 Fri Feb 10 15:37:09 2006 Started nilfs test
        41     8 Fri Feb 10 15:40:59 2006
        ...


In ordinary practice, the -s option is useful to list them briefly.

 hack> sudo listcp -lst /project/nilfs
        37     4 Fri Feb 10 15:37:09 2006 Started nilfs test
      9052     4 Fri Feb 10 15:50:48 2006 Copied work directories
      9378   108 Fri Feb 10 18:49:00 2006 Expanding attachment.tar ...
                                        | Hourly backup of home
      9511     4 Fri Feb 10 19:18:18 2006 Checked RSS: 2.6.15.4: stable
      9515     4 Fri Feb 10 19:20:37 2006 Removing documents/draft ...
      ...

A sketch file may include multiple data.  In that case, listcp
displays up to ten lines (this limit can be changed by substituting a
new value to ``TAG_LINES'')

The -t option is independent with -l option.  So you can list sketch
data simpler as follows:

 hack> sudo listcp -st /project/nilfs

        37 Started nilfs test
      9052 Copied work directories
      9378 Expanding attachment.tar ...
         | Hourly backup of home
      9511 Checked RSS: 2.6.15.4: stable
      9515 Removing documents/draft ...
      ...

The -b option shows checkpoints using a web browser.  By default w3m
is invoked.  The sketch data of each checkpoint are also shown.  In
contrast to the -t option, this option supports image data (*1). In
addition, wiki data in the sketch are expanded in the browser (*2).

When you use listcp for the NILFS directory mounted by autofs
(misc/autofs), the label of each checkpoint is linked to the
corresponding NILFS mount point.

 hack> sudo listcp -b /project/nilfs
     W3m is invoked in your terminal
     It displays a list of checkpoints.
     Let's try out.

Althought the aim of this tools is to expand the capability of CUI
based fs-interface, GUI browsers are also available. This can be
done by setting a variable BROWSER as follows.

 hack> BROWSER=firefox sudo listcp -b /project/nilfs


Notes:

 *1: For w3m, it requires w3m-img package to display images in the
     terminal

 *2: Currently, only limited syntax is supported.

---
listcp.txt,v 1.10 2006/03/17 13:53:56 ryusuke Exp
