In addition to the material provided in this manual, you can get help for Perforce commands by using the p4 help command, which provides help for individual commands or for areas of interest like jobs, revisions, or file types.
The output to the p4 help command as well as the syntax diagrams included in this manual show the short form of Perforce command options. You can also specify command options using long-form syntax. For example, instead of the following command format:
p4 reopen -c 1602 -t text+F //depot/my/file
You can now use this format:
p4 reopen --change 1602 --filetype text+F //depot/my/file
Note that long-form option names are preceded by two hyphens rather than the usual single hyphen.
The effect of the command is the same whether you use short options names or long option names. Options that are rarely used have only a short form.
To display long-form option syntax for a particular command, use the
--explain option; for example:
p4 reopen --explain
This will generate output like the following:
--omit-moved (-1): disables following renames resulting from 'p4 move' --filetype (-t): specifies the filetype to be used. --change (-c): specifies the changelist to use for the command. Usage: reopen [-c changelist#] [-t type] files...
To display information about a single option for a command, specify the
option name with
--explain; for example:
p4 revert --explain -k
You can combine the commands described in this manual in scripts. Perforce works with two types of scripts:
Triggers are user-written scripts called by a Perforce server whenever certain operations occur. Such operations include changelist submissions changes to forms, login attempts, and so on.
Daemons run at predetermined times, looking for changes to the Perforce metadata. When a daemon determines that the state of the depot has changed in some specified way, it runs other commands. For example, it might send email to parties interested in tracking the specified changes.
For more information about writing scripts, see the Perforce Server Administrator's Guide: Fundamentals.