w3reference home
CVS Tutorial


Bookmark and Share

Diff Command

The diff command shows the difference between two revisions of a file. By default, diff command shows the difference between the current local working file and the latest revision stored in the repository. The current local working file need not be saved in the repository using the commit command. For example, to show a difference between the test.txt file, which was saved in the repository yesterday, and the local working copy of the same file, the syntax is:
$ cvs diff –D yesterday test.txt
Options of diff command
Option Description
-lines Displays lines of context.
-a Treats files as text to compare files line-by-line.
-b Ignores white spaces.
-B Ignores changes, such as insertion and deletion of blank lines.
-binary Reads and writes data in binary format.
-brief Displays information whether the files differ.
-c Uses the content output format.
-d Changes the algorithm to find minor differences.
-expand-tabs Expands tabs to tableserve the alignment of tabs in the input files.
-H Handles large files with numerous scattered changes.
-I Ignores changes in the case.
-I Ignore changes, such as insertion or deletion of lines.
-L Uses label instead of the context format and unified format headers.
-s Displays a report when the two files are same.
-u Uses the unified output format.
-w Ignores white spaces when comparing files.
-y Uses the side-by-side output format.
Code Validator
Learn FTP
Color finder
Link Checker
Free web designs
Coming soon!
Interview Questions...
'w3reference : Learn by examples ... Advanced to beginner's tutorials ...'
Ajax: AJAX tutorial1 | Apache: Apache HTTP Server | Restarting Apache | CSS: CSS Border | CSS Syntax | CSS Selector | CSS Comment | CVS: CVS Release | CVS Login | CVS Logout | CVS Annotate | Databases: Rolap Tutorial | OLAP Tutorial | OLTP Tutorial | data warehousing | Expect: HTML: html | Linux: Dot (.) conf files | Linux Mount Point | Linux Filesystem | SSH Tutorial | Linux Commands: cal | cat | cfdisk | chroot | MySQL: MySQL Commands | PHP: PHP Basics | PHP Variables | PHP Output (echo/print) | PHP String Concat | PL/SQL: PL/SQL Data Types | PL/SQL Control Structures | PL/SQL File Extensions | PL/SQL DBMS_OUTPUT package | Python: My first Python program | Shell: Starting Bash | Bash Redirection | Bash Pipes | Bash Variables | SQL: SQL Transactions | SQL Constraints | SQL Drop | SQL Union & Union All | SVN: svn architecture | SVN Repository | SVN Import | SVN Checkout | Tech: soap | Web Designing: Web Hosting | HTML/XHTML/CSS code validator | Learn FTP | Search Engine Optimization Tips | www: XML: XML vs HTML | XML Syntax | XML Tags, Elements and Attributes | XML Namespaces |
Sitemap | Disclaim | Privacy Policy | Contact | ©2007-2009 w3reference.com All Rights Reserved.