This documentation was written to describe the 1.6.x series of 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

--revision (-r) REV

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.
You should read this.
$
[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, svn cat -r HEAD FILENAME will automatically fetch the HEAD revision of the specified path:

$ cat foo.c
This file is in my local working copy 
and has changes that I've made.
$ svn cat -r HEAD foo.c
Latest revision fresh from the repository!
$