List jobs known to the Perforce server
When called without any arguments, p4 jobs will list all jobs stored on the server. Its various flags and arguments can be used to limit the listing to a subset of the known jobs. The jobs listed can be limited to those that are linked to changelists that affected particular files, or to those jobs that contain certain words.
Jobs are listed in alphanumeric order by name, one job per line. The format of each line is
jobname on date by user *status* description
The description is limited to the first 30 characters, unless the -l (long) flag is used. If any of the date, user, status, or description fields have been removed by the Perforce superuser with p4 jobspec, the corresponding value will be missing from each job's output.
To limit the list of jobs to those that have been fixed by changelists that affected particular files, use p4 jobs file ... The files or file patterns provided may contain revision specifiers or a revision range.
-e jobview | List only those jobs that match the criteria specified by jobview. Please see the Usage Notes below for a discussion of job views. |
-i files ... | Include jobs fixed by changelists that affect files integrated into the named files. |
-l | Output the full description of each job |
-m max | Include only the first max jobs, sorted alphanumerically. |
-R | Rebuild the job table and reindex each job. This is necessary only when upgrading from version 98.2 or before to version 98.3 or higher. |
g_opts | See global options section. |
Can File Arg Use Revision Specifier? |
Can File Arg Use Revision Range? |
Minimal Access Level Required |
---|---|---|
Yes | Yes | list |
Use p4 jobs -e jobview to limit the list of jobs to those that contain particular words. You can specify that the search terms be matched only in particular fields, or anywhere in the text of the job. You can use jobviews to match jobs by values in date fields, though there are fewer options for dates then there are for straight text.
Text matching is case-insensitive. Each word is treated individually; phrases are not matched. Use alphanumeric text only, with no punctuation. You cannot use wildcards in jobviews.
The jobview 'word1 word2 ... wordN' can be used to find jobs that contain all of word1 through wordN in any of the job's fields. Spaces between search terms in jobviews act as boolean and's. To find jobs that contain any of the terms, separate the terms with the "|" character. Ampersands (&) can be used as boolean ands as well; the boolean operators bind in the order &, |, space (highest precedence to lowest precedence). Use parentheses to change the grouping order.
Search results can be narrowed by matching values within specific fields with the jobview syntax 'fieldname=value'. Value must be a single alphanumeric word.
Date fields can be matched by expressing the jobview date as yyyy/mm/dd or yyyy/mm/dd:hh:mm:ss. If a specific time is not provided, the equality operator (=) matches the entire day.
The usual comparison operators are available. They are:
Additionally, you can use the not operator ^ to negate the sense of some comparisons. (See Limitations, below, for details).
The behavior of these operators depends on the type of job field you're comparing against:
If you're not sure of a field's type, run p4 jobspec -o, which outputs the job specification used at your site. The p4 jobspec field called Fields: contains the job fields' names and datatypes. See p4 jobspec for a discussion of the different field types.
To create or edit an existing job | p4 job |
To attach a job to a particular changelist, indicating that the job is fixed by that changelist | p4 fix |
To list all jobs and changelists that have been linked together | p4 fixes |
To view all the information about a particular changelist, including the jobs linked to the changelist | p4 describe |
To change the format of the jobs used on your server (superuser only) | p4 jobspec |
To read information about the format of jobs used on your site (any user) | p4 jobspec -o |
To set a default jobview that will include jobs matching the jobview in all new changelists | p4 user |