C-Kermit 7.0 Case Study #18

[ Previous ] [ Next ] [ Index ] [ C-Kermit Home ] [ Kermit Home ]

Article: 11117 of comp.protocols.kermit.misc
From: [email protected] (Frank da Cruz)
Newsgroups: comp.protocols.kermit.misc
Subject: Case Study #18: File Timestamps and Permissions
Date:3 Feb 2000 23:42:02 GMT
Organization: Columbia University

Ever since the late 1980s, the popular Kermit programs have been able to send a file's timestamp along with the file, allowing the receiver to give the incoming file the same timestamp as the original. This is not just a frill. It can also be a useful feature when used in conjunction with SET FILE COLLISION UPDATE.

In case you didn't know about this feature (which is not new at all), suppose you have MS-DOS Kermit or Kermit 95 on a PC connected to a UNIX or VMS system that has C-Kermit. And suppose you have a directory on the PC containing many files that you work on each day, and you want to back them up periodically to the UNIX or VMS system (whose file system, in turn, is backed up to tape for disaster recovery).

Obviously you could send all the files every day, but if your connection is slow and/or the files are large and/or many, this could be tedious and wasteful. So just tell the Kermit receiver to:

  SET FILE COLLISION UPDATE

This means: if a file arrives that has the same name as an existing file, the receiver is to refuse the incoming file if its timestamp is not newer the existing file's. So now if your "send *.*" command matches 200 files, you don't have to bother about which ones were changed and which were not. Only those that were changed are transferred, the rest are skipped automatically.

C-Kermit 7.0 also transmits a new piece of information about each file: its "protection code" or "permissions". This is mainly to solve the annoying problem in which execute permission was lost when transferring from Unix to Unix. Now if you use two copies of C-Kermit to transfer a Unix executable from one Unix system to another, you no longer have to "chmod +x" the result before you can run it.

This new feature works across platforms too; for example, between Unix and VMS. If you use C-Kermit 7.0 to send a UNIX executable to VMS and from VMS back to another Unix system, it keeps its execute permission every step of the way.

Preservation of timestamps and permissions is another feature you won't find in other cross-platform data transfer protocols like FTP. When combined with Kermit's new automatic per-file text/binary-mode switching and recursive directory traversal capability, you can produce a remarkable facsimile of a directory tree and all its files from one computer to another, even if they are different operating systems (but obviously permissions are lost if one of the OS's -- e.g. DOS or Windows -- does not have a file system that supports them).

Combine all of this with SET FILE COLLISION UPDATE, and you have the classic incremental backup.

For details about Kermit's new file permissions capabilities, see Section 4.4 of the C-Kermit 7.0 update notes.

- Frank

[ Top ] [ Previous ] [ Next ] [ Index ] [ C-Kermit Home ] [ Kermit Home ]


C-Kermit 7.0 / Columbia University / [email protected] / 3 Feb 2000