1826325 Members
3515 Online
109692 Solutions
New Discussion

Re: File version

 
jpaulino05
Occasional Contributor

File version

There is any way to stop the file version incresing every time I edit and modify the file?
4 REPLIES 4
Jan van den Ende
Honored Contributor

Re: File version

jpaulino05

not by default,
but if you REALLY want it, you can
$ SET FILE/VERSION_LIMIT=1
and after editting . , you can
$ RENAME . *.*;1

But you will grow to regret this! Every once in a while it can be SOOOO useful to still have the old version(s).

And when you are SURE you no longer have any use for them,
$ PURGE .
will bring the number down to one.
And for any normal use it will be a while till you reach 32767 (2^15 - 1), which is the highest number allowed.

hth

Proost.

Have one on me.

jpe

Don't rust yours pelled jacker to fine doll missed aches.
Willem Grooters
Honored Contributor

Re: File version

If you put thee files into the same directory, you cann set the file version limit on ALL files in that directory using
$ SET DIRECTORY/VERSION_LIMIT=1 . The file number _will_ increase( indeed: rename the file to version 1)
If you want it the Unix way, try the GNV packages and use bash (this has some nsaty issues, though).

But why would you. You do not have to specify the version number in a filspec, ANY aaccess without it will give you the highest version. There will be one day that you will regret you ever lost your "old" files.
Willem Grooters
OpenVMS Developer & System Manager
jpaulino05
Occasional Contributor

Re: File version

Exelent. thks a lot
Sheldon Smith
HPE Pro

Re: File version

As a *long* time VMS admin/support, I would STRONGLY recommend adding

$ dir*ectory == "directory /version=1"

to your login.com file (and add any other qualifiers if you already have a directory symbol defined). As mentioned above, sooner or later, you WILL want to have a recent older version of a file. But a directory listing that runs for screens with multiple instances of any given file name is definitely an annoyance. So, once you have the above directory symbol defined, the only time you will actually SEE multiple versions of a file is if you do something like

$ dir /vers=10 /size file_i_think.i_corrupted

You may also want to set a *reasonable* version limit (say, 20?) on all existing files:

$ set file <...>*.* /version=20
$ purge <...>*.* /keep=20

And also set the limit on future files in the directory, which command escapes me at the moment, but I am sure someone will follow on and post that as well.

You can, when you are VERY sure, do a massive cleanup to get rid of any older versions:

$ purge <...>*.*

Note: While I am an HPE Employee, all of my comments (whether noted or not), are my own and are not any official representation of the company

Accept or Kudo