This documentation was written to describe the 1.7.x series of Apache™ Subversion®. If you are running a different version of Subversion, you are strongly encouraged to visit http://www.svnbook.com/ and instead consult the version of this documentation appropriate for your version of Subversion.

Name

svn cat — Output the contents of the specified files or URLs.

Synopsis

svn cat TARGET[@REV]...

Description

Output the contents of the specified files or URLs. For listing the contents of directories, see svn list later in this chapter.

Options

Examples

If you want to view readme.txt in your repository without checking it out:

$ svn cat http://svn.red-bean.com/repos/test/readme.txt
This is a README file.
Don't bother reading it.  The boss is a knucklehead.
 
INSTRUCTIONS
============

Step 1:  Do this.

Step 2:  Do that.
$

You can view specific versions of files, too.

$ svn cat -r 3 http://svn.red-bean.com/repos/test/readme.txt
This is a README file.
 
INSTRUCTIONS
============

Step 1:  Do this.

Step 2:  Do that.
$
[Note] Note

You might develop a reflex action of using svn cat to view your working file contents. But keep in mind that the default peg revision for svn cat when used on a working copy file target is BASE, the unmodified base revision of that file. Don't be surprised when a simple svn cat /path/to/file invocation fails to display your local modifications to that file!

[Tip] Tip

If your working copy is out of date (or you have local modifications) and you want to see the HEAD revision of a file in your working copy, use the --revision (-r) option: svn cat -r HEAD FILENAME