ZTree.com  | ZEN  | About...  

 Index   Back

Just discussing now   [Help!]

By: Slobodan Vujnovic   Homepage   France  
Date: Feb 08,2019 at 19:37
In Response to: Just discussing now (Peter Shute)

> I'm just surprised there's no well known solution to this kind of
> thing. Disks filling up with logs seems to be a very common problem, like
> programmers can't be bothered to think ahead about the time bomb
> they've created.

This was partially fixed in high-end OSs. I'm familiar with OpenVMS (started
as VAX/VMS about 40 years ago), and it solves this problem out of the
box. When you create a directory, you can tell VMS to manage the number
of file versions in that directory via:

CREATE/DIRECTORY/FILE_LIMIT=20

and it will only keep the last 20 versions of each unique file.
Log files are typically named (no time stamps in this case):

OPERATOR.LOG;1 when first created
OPERATOR.LOG;2
OPERATOR.LOG;3
OPERATOR.LOG;4
...
OPERATOR.LOG;32768

There is no such thing as VMS deleting a file, ever. It always creates
a new version of everything and increments the ";n" part of the name.
For example, as you edit a text files and hit Save, a new version
gets created with ;n incremented. Also, if you:

COPY my.dat;34 my.dat

you will get a my.dat;35.

One problem that wasn't anticipated is reaching ;32768 and the version
wrapping to ;1, but most installations have scripts that track busy
directories and take care of it.

Keeping copies of weekly/monthly versions requires some scripting
and batch jobs, which are easy to do in VMS.

If you wanted your directory to behave like unix/Windows, you would force:

CREATE/DIRECTORY/FILE_LIMIT=1

but nobody ever does this risking losing files by overwriting them.

In fact, Windows is (sometimes) doing that (when you download files, for
example) by adding (1), (2) to the file name, rather than telling you that the
file exists:

dartium-win.zip
dartium-win(1).zip
dartium-win(2).zip

964 views      
Thread locked
 

Messages in this Thread

 
96,637 Postings in 12,231 Threads, 350 registered users, 117 users online (0 registered, 117 guests)
Index | Admin contact |   Forum Time: Mar 29, 2024 - 3:16 pm UTC  |  Hits:62,410,585  (25,371 Today )
RSS Feed