- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- rename path issue [ newbie question]
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-08-2005 02:22 PM
тАО08-08-2005 02:22 PM
I am trying to move directory and it's subdirectories and all their contents from
disk1:[acct1.data]dirTOMOVE to
disk1:[ACCT2.data]dirTOMOVE
so I did
$rename disk1:[acct1.data.dirTOMOVE...]*.*;* disk1:[ACCT2.data]*.*;*
However, this copies the subdirectories directly to the data folder
so I have disk1:[ACCT2.data.subdir] instead of disk1:[ACCT2.data.dirTOMOVE.subdir]
Please let me know what you think
Thanks in advance
Nipun
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-08-2005 03:11 PM
тАО08-08-2005 03:11 PM
Re: rename path issue [ newbie question]
You've got the answer in your description... Try:
$ RENAME/LOG -
DISK1:[ACCT1.DATA]DIRTOMOVE.DIR -
DISK1:[ACCT2.DATA]DIRTOMOVE.DIR
This will move the directory file (and all its contents). Good policy to use /LOG, especially if you're unsure what's going to happen.
Note that if ACCT1 and ACCT2 are owned by different users, you may want to reset the file ownerships as well:
$ SET DIRECTORY/OWNER=acct2 DISK1:[ACCT2.DATA.DIRTOMOVE]
$ SET FILE/OWNER=acct2 DISK1:[ACCT2.DATA.DIRTOMOVE...]*.*;*
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-08-2005 08:01 PM
тАО08-08-2005 08:01 PM
Re: rename path issue [ newbie question]
directory in vms are file with .DIR extension.
Rename can work just on the same disk.
Antonio Vigliotti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-08-2005 08:09 PM
тАО08-08-2005 08:09 PM
Re: rename path issue [ newbie question]
WADR (with all due respect), I believe that John omitted an important case in his answer.
John discussed the very common case of renaming a directory from one name to another. His answer is completely correct, as is his well noted comment about file ownership. To his comment, I will add a comment about the File Protection Masks and Access Control Lists (ACLS), which also may require adjustment, depending on your security issues.
John's answer, did however, omit the possibility that the RENAME operation was a merge of the files contained in disk1:[acct1.data...] with the contents of the directory tree disk1:[ACCT2.data...].
In that case, your RENAME command should be:
$ RENAME/LOG disk1:[acct1.data...]*.*;* disk1:[ACCT2.data...]*.*;*
Two things to note about the above:
- first, the ellipsis (...) on both source and the destination are critical
- the /LOG output will not include files (or for that matter, directories) that are included in sub-directories that are moved in total when the sub-directory is renamed.
Note that the use of RENAME only works for the same device, if the devices are different, BACKUP is the preferred utility.
I hope that the above is helpful.
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-08-2005 09:11 PM
тАО08-08-2005 09:11 PM
Re: rename path issue [ newbie question]
Q
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-08-2005 10:03 PM
тАО08-08-2005 10:03 PM
Re: rename path issue [ newbie question]
Yes, BACKUP is a good option. However, Nipun did not specify the size (or for that matter, the allocations) of the files in the original directory tree.
If the files are large, of they are specially allocated (e.g., contiguous, placement control), or if there is not enough space for two copies of the files on the disk, RENAME is Nipun's best option.
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-09-2005 01:29 AM
тАО08-09-2005 01:29 AM
Re: rename path issue [ newbie question]
Antonio Vigliotti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-09-2005 02:54 AM
тАО08-09-2005 02:54 AM
Re: rename path issue [ newbie question]
yeah I the files are huge and on the same disk so renaming is the only option I have and I have to be careful.
when I do
$ RENAME/LOG -
DISK1:[ACCT1.DATA]DIRTOMOVE.DIR -
DISK1:[ACCT2.DATA]DIRTOMOVE.DIR
Does this mean I need to have DIRTOMOVE.DIR already created in ACCT2 before hand?
in order to effectively copy all the subdirectories in the right order.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-09-2005 03:08 AM
тАО08-09-2005 03:08 AM
Re: rename path issue [ newbie question]
ACCT2 can't exist, so can't exit its subdirectory.
Antonio Vigliotti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-09-2005 03:14 AM
тАО08-09-2005 03:14 AM
Re: rename path issue [ newbie question]
>>> when I do $ RENAME/LOG -
DISK1:[ACCT1.DATA]DIRTOMOVE.DIR -
DISK1:[ACCT2.DATA]DIRTOMOVE.DIR
>Does this mean I need to have DIRTOMOVE.DIR >already created in ACCT2 before hand?
Yes.
You will also need to unprotect the directories before delete or rename as by default they are protected against delete.
Now you are not deleting, only writing, but changing directory entries can 'appear' to look like deleting (both cases can result in 'file not found' :-).
What I tend to do is a simple, sleazy: SET PROT xxx.DIR.
This will apply the default file protection which will allow delete.
You should reset afterwards, but you can not delete non-empty directories anyway.
Hein.