There are systems for making sure that two people aren’t editing the same file.

There are two systems for controlling projects that are worked on by multiple users: RCS (Revision Control System) and SCCS (Source Code Control System). We aren’t going to tell you much about them, but you should understand a little about how they work.

Both RCS and SCCS are designed for maintaining edits to a file. The idea is that the revision system keeps a record of what changes were made to a file and when, so that if you ever want to revert to a previous version you can do it easily. For programmers, this is very important, since today’s changes might introduce new bugs and the only way to fix it is to revert to a previous version. You can also see a list of differences between two versions of a file, to help you figure out exactly where things went wrong.

RCS and SCCS also give users a way to “lock” a file. By locking a file, you declare that you’re making changes to the file, and no one else better touch it. Locking a file is also called “checking out” a file.

By using RCS or SCCS, you can not only maintain your files, but also ensure that only one user is editing them at the same time.

Under RCS or SCCS, the archive containing all versions of the file is maintained in a separate file, usually in an RCS or SCCS subdirectory. You may not even see a copy of the file in the main directory. If you do see a copy of the file, you won’t have write permission to the file unless you have “locked” the file for editing.

RCS and SCCS are complex systems, too complex to cover in detail here. However, if you have either RCS or SCCS installed on your system, you should be sure to learn how to use it, since it is one of the safest ways for multiple users to share files.

Get WYNTK: UNIX System Admininistrator now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.