Using RCS to Track Your File Changes

Keeping track of your edits to important text files? Don't litter your directories with file.old, file.old-version-1, file.bak and similar untidy file names. Instead, make use of 'RCS' - you only need a few simple commands - and all your changes are tracked carefully, and optionally with descriptive comments. Here's how:

Begin by creating a directory called 'RCS':

mkdir RCS

'Check in' your file to the RCS directory

ci -l filename.txt

Enter a descriptive comment, terminated with a '.' on a line by itself. If you don't want to added a comment just type '.'.

Make some edits to your file, and then check it in again

ci -l filename.txt

Again, enter some more descriptive comments, terminated with a '.' on a line by itself

Then if you want to see the history of the file, type:

rlog filename.txt

If you want to see what you have changed recently, and not checked in:

rcsdiff filename.txt

And if you want to compare two specific versions of the file:

rcsdiff -r1.1 -r1.2 filename.txt

Finally, for reference:

man rcsintro

Gives a large amount of additional information, but the small number of commands described here are very powerful for tracking your local edits to important files - and are highly recommended!

Comments are closed

If you would like to get in touch with me, please mail zfs at themolecularuniverse.com

recent comments

Posted by ZFS | Permanent link
[StumbleUpon] [Digg] [Reddit] [Facebook] [Google]