Previous Table of Contents Index Next
Perforce 2009.2: Command Reference



p4 sizes
Synopsis
Display size information for files in the depot.
Syntax
p4 [g-opts] sizes [ -a -s -z -b blocksize ] file[revRange] ...
Description
The p4 sizes command displays the sizes of files stored in the depot. When called with no options, only the size of the head revision of the file or files is displayed. One line of output is provided per file.
Use the -a option to see how much space is occupied by each individual revision in the specified revision range, rather than just the highest revision in the specified range. One line of output is provided per file, per revision.
Use the -s option to obtain the sum of all files specified. Only one line of output is provided, showing the file specification, the number of files summarized, the total number of bytes required, and (if the -b option is provided) the total number of blocks required.
The -z option works the same way as -s, but excludes space occupied by lazy copies (files that exist by virtue of integration operations). Use -z to estimate the space occupied by files on a Perforce server, and use -s to estimate the local diskspace requirement if files were synced to a client workspace.)
Options
-b blocksize
Display results in blocks of blocksize bytes. Each accumulated file size is rounded up to the nearest blocksize bytes.
Usage Notes
Can File Arguments Use
Revision Specifier?
The p4 sizes command is functionally similar to the UNIX du command.
File sizes are based on the normalized (UNIX linefeed convention) and uncompressed version of the depot file, regardless of how the file is represented when synced to a client workspace.
Examples
p4 sizes file.c
Show the sizes of each revision of file.c stored in the depot.
Show the total size of all revisions of file.c stored in the depot.
Show the number of files and the total diskspace (in bytes and 512-byte blocks) currently used by a Perforce Server hosting //depot/...
Show the number of files and the total local diskspace (in bytes) required to sync the head revisions of files mapped to the client workspace named workspace.
 


Previous Table of Contents Index Next

Perforce 2009.2: Command Reference
Copyright 1999-2009 Perforce Software.