Editing
Scanco Administration
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==File Operations== ===Copy and Move=== ====Copy files between accounts/users==== As user <code>system</code> you can copy files between accounts (e.g., microct and devel). There is no need to set user/priv=bypass as this is set by default as user system. If you want to copy between two users (i.e. normal users, not calibration or system), then you can only write on the user directories for which you are logged in. So, if you want to copy files from account xtremect2 to microct, you need to log into microct account and copy the file from xtremect2 to microct If you want to use the backup command for copying multiple subdirectories with the three dots (e.g., <code>disk2:[microct.data.00000034...]</code>) then you HAVE to put an <code>/owner=devel</code> at the end: <pre> $ backup/log disk2:[microct.data.00000034...] - disk2:[devel.data.00000034...]/own=devel </pre> [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====Move a directory on the same device==== You can simply use the rename command to move a directory on the same device, but you need to set DELETE protection for the file owner for this to work $ set prot=o:rwed <dir>.dir $ ren <dir>.dir new:[parent.directory] $ set prot=o:rwe new:[parent.directory]<dir>.dir [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====Move a whole directory structure with BACKUP command==== Sometimes we want to move entire directories. For example, moving a measurement directory from DISK2 to DISK6, or moving a project to another disk. Here is how to move a project: $ BACKUP DISK2:[MICROCT.PROJECTS...] DISK3:[MICROCT.PROJECTS...]/VERIFY Note the use of <code>...</code> in both places. If you move a data measurement, you could do it as follows: $ BACKUP DISK2:[XTREMECT2.DATA...] DISK6:[XTREMECT2.DATA...]/LOG/VERIFY In both cases, you can add a <code>/DELETE</code> command to so that it deletes after the move is completed and verified (files will be deleted, but not folders). $ BACKUP/VERIFY/DELETE DISK2:[XTREMECT2.DATA...] DISK6:[XTREMECT2.DATA...]/LOG/VERIFY Alternatively, you can simply check that the move was successful, and then delete the original files (be <b>very</b> careful!!): $ delete disk2:[microctt.projects...]*.*;* $ dl disk2:[microctt.projects...]*.dir ! A for all; do until sub-dirs are gone Note that I've misspelled "microctt" on purpose as these commands are VERY dangerous. You could wipe out a lot of data by accident. Be careful! [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====Fix corrupted VMS files when moved to or from a PC==== There seem to be two options. The most simple one is to simply run: $ set file/attr=(lrl:512, rfm:fix) filename.isq Alternatively, we start by getting good file format/attributes from a good aim/isq/gobj, etc. $ ana/rms/fdl/out=correct.fdl good.aim Then we edit the file <code>correct.fdl</code>, leaving only 5 lines: RECORD BLOCK_SPAN yes CARRIAGE_CONTROL none FORMAT fixed SIZE 512 Now we have to set the file attributes of the affected aim (isq, gobi) file: $ set file/attr=lrl=514 bad.aim ! Yes, 514 $ set file/attr=lrl=514 *.AIM ! do a bunch at a time Finally we create a fixed file $ convert/fdl=correct.fdl/trunc bad.aim converted.aim This process discards the superfluous 2 bytes, usually caused by transferring to/from a PC. [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ===Delete=== ====Delete older versions of files==== Use the PURGE command.[[Image:Bones2.jpg|20px]] <b>Warning:</b> Extreme caution! <pre> $ PURGE !Removes older versions of all files in the directory! CAREFUL!!!! $ PURGE myfile.aim !Removes older versions of myfile.aim. $ PURGE /KEEP=3 !Removes all but the three most recent versions of all files. $ HELP PURGE !More information on the PURGE command. </pre> [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====Undelete Files==== The Disk/File Utility (DFU) will allow you to restore files that have been deleted, however, you will only be able to do so if the disk space hasn't been overwritten. This means that unless all scanning and access to the disk is stopped, you likely only have a couple of hours at most to undelete the files. <br> <br> Login as the system user and start the disk file utility program, DFU. <br> <pre> $ dfu DFU> undelete diskX: /file=myfile OR undelete filepath/filename </pre> <br> For example, suppose we want to restore an RSQ (C0001234.RSQ) that was deleted from the BH data disk (disk2):<br> <pre> DFU> undelete disk2:/file=C0001234.RSQ </pre> If the file can be undeleted successfully (i.e., without corruption), then you will be asked if you wish to restore the file. Type "y" or "n".<br> When done restoring desired files, to get out of dfu: <pre> DFU> exit $ logout </pre> <br> *The undelete function will lock access to the disk while it searches for a file and until you respond "y" or "n" to restoring it. This means that all programs and commands trying to access the disk (i.e., by other people using the system) will appear to freeze momentarily until the disk is unlocked. *If you search for a specific file, the lock period will be very short (maybe 15-30 seconds). If you search for files in general (e.g., *.RSQ), the lock period will be longer (maybe 5 to 10 minutes). *You cannot search specific locations for files (i.e., a folder on a disk). *Files are restored to their original location on disk. *More information on DFU can be found here: http://digiater.nl/dfu.html [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====Delete a directory/file==== Use the DL command (this calls the script $ @SCOM:DL.COM), but first remove all files from the directory. [[Image:Bones2.jpg|20px]] <b>Warning:</b> Extreme caution! <pre> $ DEL [.subdir...]*.*;* !Deletes all files in subdir. CAREFUL!!! $ DL subdir.dir; !Deletes subdir.dir with confirmation. $ DL disk:[dir.subdir...]*.dir !* for all; do until subdirs are gone. </pre> Use the DELETE command, but first remove all files from the directory and set file protections to enable deletion of the directory. <pre> $ SET FILE/PROT=O:RWED [.subdir...]*.*;* !Changes protections so you can delete the files. O is short for OWNER and RWED refers to Read, Write, Edit, Delete. $ DEL [.subdir...]*.*;* !Deletes all files in subdir. CAREFUL!!! $ SET FILE/PROTECTION=O:RWED subdir.dir !Changes protections so you can delete the subdirectory subdir.dir. $ DEL subdir.dir; !Deletes the subdirectory. </pre> If the file cannot be deleted to due a permission error <pre> $ purge 12_RAD_FX.AIM %PURGE-W-FILNOTPUR, error deleting DISK4:[BONELAB.PROJECTS.MULTILOAD.CAMOS]12_RAD_FX.AIM;1 -RMS-E-FLK, file currently locked by another user </pre> Do the following: <pre> $ set ho 0 ! log in as calibration $ spb $ del DISK4:[BONELAB.PROJECTS.MULTILOAD.CAMOS]12_RAD_FX.AIM;1 $ logout </pre> If that still doesn't work, then maybe you need to kill a process first: <pre> $ show device disk4 /file ! shows all the files currently involved in a process $ set ho 0 ! log in as 'system' $ stop /id=2081F1EC $ del DISK4:[BONELAB.PROJECTS.MULTILOAD.CAMOS]12_RAD_FX.AIM;1 $ logout </pre> Or if you have a lot of sub directories in the main directory, you can use our script: <pre> $ @IDISK1:[XTREMECT2.COMMANDS]BACKUP_DELETE.COM </pre> [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ===Authorizations=== ====Can not access a Projects directory==== In principal, all Scanco user accounts (even including the calibration ones) should have read and write access to the Projects directories. While it (denied reading or writing access to a Project folder) did happen for a reason (used different accounts to create a file or a subfolder within a Projects folder), you could let lab administrator know and carefully run the following command to overwrite the authority, or switch to microct or xtremct2 account to perform as a walkaround. <pre> $ set file/prot=(g:rwe,o:rwe) disk4:[bonelab.projects.danielle...]*.*;* </pre> To avoid this happening again, make use always using the same account consistently to create all files and subfolders within their Project folder. [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']]
Summary:
Please note that all contributions to bone.wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
BoneWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
associated-pages
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Documents
Recent changes
Help
Tools
What links here
Related changes
Page information