Displaying file contents

To display the contents of a file in the depot, issue the p4 print filespec command. This command prints the contents of the file to standard output or to a specified output file, with a one-line banner that describes the file. To suppress the banner, specify the -q option. By default, the head revision is displayed, but you can specify a file revision.

To display the contents of files Use this command

At the head revision

p4 print filespec

Without the banner

p4 print -q filespec

At a specified changelist number

p4 print filespec@changenum