Changeset 134964 for trunk/base


Ignore:
Timestamp:
Apr 12, 2015, 7:05:00 PM (5 years ago)
Author:
cal@…
Message:

base: document port space, #44530

File:
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/base/doc/port-space.1.txt

    r133158 r134964  
    11// vim: set et sw=4 ts=8 ft=asciidoc tw=80:
    2 port-select(1)
    3 ==============
     2port-space(1)
     3=============
    44$Id$
    55
    66NAME
    77----
    8 port-select - Switch between different implementations of a tool
     8port-space - Show the disk usage of the given ports
    99
    1010SYNOPSIS
    1111--------
    1212[cmdsynopsis]
    13 *port* [*-dvp*] *select* --summary
    14 
    15 [cmdsynopsis]
    16 *port* [*-dvp*] *select* --show 'group'
    17 
    18 [cmdsynopsis]
    19 *port* [*-dvp*] *select* [--list] 'group'
    20 
    21 [cmdsynopsis]
    22 *port* [*-dvp*] *select* [--set] 'group' 'option'
     13*port* [*-D* 'portdir']  *space* [--units 'unit'] ['total']
     14    [['portname' | 'pseudo-portname' | 'port-expressions' | 'port-url']]
    2315
    2416DESCRIPTION
    2517-----------
    26 *port select* provides a mechanism to choose from different implementations of
    27 a common tool or port. Selecting one of the options makes it the primary version
    28 or implementation, e.g. the one to be run by default when you do not explicitly
    29 select a version or implementation on the command line.
     18*port space* lists the amount of disk space the port(s) given on the command
     19line occupy on disk. Note that the space reported is for the files installed by
     20a port, but not the image of the port's files MacPorts keeps internally. See the
     21*PORT IMAGES* section for more information on how images work. Consequently,
     22*port space* will only work on active ports.
    3023
    31 Note that *port select* is only for your convenience as user. It does not, for
    32 example, affect which compiler MacPorts uses when it compiles software, or
    33 against which copy of MySQL a port builds. If there is a user-visible choice, it
    34 is usually offered as a variant on the port. If the *port select* mechanism
    35 affects how a port builds, that should be considered a bug.
     24By default, *port space* will print a line with the size in an appropriate unit
     25followed by the name of a port for each port given on the command line (or
     26expanded from a pseudo-port expression given; see man:port[1] for more info on
     27pseudo-port expressions). The last line of output will contain a total.
    3628
    37 One example is the set of MySQL and forks of MySQL, where there are mysql51,
    38 mysql55, mysql56, mariadb, mariadb-10.0, mariadb-11.0, percona, possibly among
    39 others. *port select* lets you choose which of these becomes the version run,
    40 when you simply run 'mysql' or other commands from the MySQL suite.
    41 
    42 *port select* has multiple modes of operation: It can display a summary, show
    43 the current primary implementation and list all available implementations given
    44 a group name, and change the primary implementation. See *OPTIONS* below for
    45 details.
     29If you are only interested in the total of all ports (e.g. if you want to get
     30the total amount of space used by your installed ports) use the *--total* flag.
     31If you want to sort the output by file size, you can pipe the results of *port
     32space* to *sort -n*. Since *port space* defauts to using a suitable unit, you
     33should specify a unit to allow for meaningful numeric sorting, e.g. *port space
     34--units KiB* to get all output in KiB.
    4635
    4736OPTIONS
    4837-------
    49 *--summary*::
    50     Display a summary of all available selection groups, their current primary
    51     implementation and a list of all available choices.
     38*--total**::
     39    Only print the total amount of space used by all given ports.
    5240
    53 *--show* 'group'::
    54     Print the current primary implementation for the given group.
     41*--units 'unit'*::
     42    Choose the unit in which the size is given. You should specify this if you
     43    intend to sort the output. Valid values for 'unit' are
    5544
    56 *--list* 'group'::
    57     Print a list of all currently available choices for the given group. This is
    58     the default when *port select* is called with one argument.
     45    *B*:::
     46        List sizes in bytes.
    5947
    60 *--set* 'group' 'option'::
    61     Make 'option' the primary selection for the 'group' group. This is the
    62     default when *port select* is called with two arguments.
     48    *K*, *Ki*, *KiB*:::
     49        List sizes in KiB, i.e., 1024 bytes.
     50
     51    *Mi*, *MiB*:::
     52        List sizes in MiB, i.e., 1024 * 1024 bytes.
     53
     54    *Gi*, *GiB*:::
     55        List sizes in GiB, i.e., 1024 * 1024 * 1024 bytes.
     56
     57    *k*, *kB*:::
     58        List sizes in kB, i.e., 1000 bytes.
     59
     60    *M*, *MB*:::
     61        List sizes in MB, i.e., 1000 * 1000 bytes.
     62
     63    *G*, *GB*:::
     64        List sizes in GB, i.e., 1000 * 1000 * 1000 bytes.
     65
    6366
    6467include::global-flags.txt[]
    6568
     69include::archives.txt[]
     70
    6671EXAMPLES
    6772--------
    68 If you have both the mysql56 and the percona port installed, you can switch your
    69 implementation of the 'mysql' command by running
     73To find the 10 largest ports in your MacPorts installation, you can use the
     74following command:
    7075----
    71 $> sudo port select --set mysql $option
     76$> port space --units MiB active | sort -rn | head -n10
    7277----
    73 where '$option' is 'mysql56' if you want the version from MySQL, or 'percona',
    74 if you want the version from Percona.
    7578
    7679SEE ALSO
    7780--------
    78 man:port[1]
     81man:port[1], man:port-archive[1], man:sort[1]
    7982
    8083AUTHORS
Note: See TracChangeset for help on using the changeset viewer.