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!
=OpenVMS= ==OpenVMS References== *[[Media:OpenVMS Users Manual.PDF| OpenVMS User Manual]] *[[Media:Vmsfaq.pdf| OpenVMS FAQ]] [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ==Unix related== *[[Media:Vms-unix-commands.pdf| OpenVMS Commands with UNIX equivalents]] [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ===Unix filenames on VMS with multiple '.'=== The directory names would have been cvs-1.11.21.dir on Linux. However VMS doesn't allow more than 1 . in the name. If you enter <pre>$ set process/parse=extended</pre> in a terminal you'll be able to access these files. You could consider renaming them i.e. cvs-1_11_21.dir. [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ===Unix command line basics=== ====Twelve Essential Commands==== These are the commands which you have to know in order to be basically functional with a shell (command line). {| |-valign="top" |width="80pt"| <tt>ls</tt> | List directory contents. <tt>ls -l</tt> long listing with dates and permissions <tt>ls -a</tt> list all, including hidden files (hidden files start with a period) |-valign="top" | <tt>cd</tt> | Change directory. <tt>cd -</tt> change to previous directory <tt>cd ~</tt> change to home directory <tt>cd ..</tt> change to parent directory |-valign="top" | <tt>pwd</tt> | Print current (working) directory. |-valign="top" | <tt>cp</tt> | Copy file(s). <tt>cp -r somedir somedest</tt> Copy recursively (directory and all contents) |-valign="top" | <tt>mv</tt> | Move (or rename) a file (or directory) |-valign="top" | <tt>rm</tt> | Delete (remove) a file. <tt>rm -r somedir</tt> Delete recursively (directory and all contents) <tt>rm -ri somedir</tt> Delete recursively, but prompt before each removal <tt>rm -rf somedir</tt> Delete recursively, never prompt |-valign="top" | <tt>mkdir</tt> | Create directory. |-valign="top" | <tt>rmdir</tt> | Remove (empty) directory. |-valign="top" | <tt>cat</tt> | Print file contents (to console). |-valign="top" | <tt>less</tt> | Scroll through file contents, one page at a time. SPACEBAR to advance a page, B to go back a page, Q to quit, /pattern to search for pattern |-valign="top" | <tt>man</tt> | Get help on <tt>command</tt>. (eg. <tt>man ls</tt> for help on <tt>ls</tt>). You move around in man as you do with less: SPACEBAR is forward a page, and so on. |-valign="top" | <tt>exit</tt> | Close shell (i.e. the terminal). If this is your login shell, you will log out. |} [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====File names with spaces==== Spaces on the command line separate arguments. Therefore file names containing spaces require special treatment to avoid being interpreted as two separate files. There are a couple of methods. You can use quotes: cp "file name with spaces" file_name_without_spaces You can also use the backslash, which indicates that any special significance is to be removed from the following character. Thus a space, instead of being the delimiter for arguments on a command line, is to be interpreted as a regular character. cp file\ name\ with\ spaces file_name_without_spaces [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====Copying and pasting==== Copying and pasting in a terminal is generally done with the middle mouse button. Just mark the text you want to copy with the mouse, holding down the left mouse button in the usual way. Then move the cursor (which is different than the mouse pointer - move the cursor with arrow keys typically) to where you want to insert and click the middle mouse button (on a wheel mouse the middle button is the wheel). Tip: You can double-click to mark a whole work, or triple-click to mark a whole line. Remember - you haven't only marked it, you've put it in the clipboard. Note: This applies to X11, for example on Linux. If using OS-X, just use Option-C and Option-V as usual. [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====Recalling previous commands==== You can scroll though your previous commands (command history) by using the UP and DOWN arrow keys. A more advanced trick is to use CTRL-R, which is particularly useful when you want to recall a command you used some time ago. Hit CTRL-R and then start typing some fragment of the command you're searching for. The prompt will automatically update to show you the most recent match to the fragment you've typed so far. If you want the matching command previous to the one shown, hit CTRL-R again. Once you've got the previous command you're looking for, hit ENTER to run it again, or start editing it. [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====Be lazy: use TAB to minimize typing==== Some commands and especially some file names can be pretty long. Don't want to type it all? Type the first few letters, then hit TAB. The shell will fill in the rest, as far as there is a unique completion (either command or filename). If there is not a unique completion to the end, you might have to type another character or two and then hit TAB again. [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====Keyboard Shortcuts==== Here are some common command line keyboard shortcuts. Some of these are bash-specific shortcuts, so not all of them will work on all systems. Note: If you're using OS-X, a number of the editing shortcuts below work in ALL programs in OS-X. (With the sad exception of Microsoft Office, which overrides the system-wide key bindings.) {| |+ Table 1. Common editing key bindings |- |width="80pt"| <tt>CTRL-A</tt> || Move to the end of the line. |- | <tt>CTRL-E</tt> || Move to the beginning of the line. |- | <tt>CTRL-F</tt> || Move forward one character. |- | <tt>CTRL-B</tt> || Move backward one character. |- | <tt>ALT-F</tt> || Move forward one word. |- | <tt>ALT-B</tt> || Move backward one word. |- | <tt>CTRL-D</tt> || Delete one character forward. |- | <tt>CTRL-H</tt> || Delete one character backward. |- | <tt>ALT-D</tt> || Delete one word forward. |- | <tt>CTRL-W</tt> || Delete one word backwards. |- | <tt>CTRL-K</tt> || Delete (Kill) everything from the cursor forwards (to the end of the line). |- | <tt>CTRL-U</tt> || Delete everything from the cursor backwards (to the beginning of the line). |- | <tt>CTRL-T</tt> || Transpose two characters. |- | <tt>ALT-T</tt> || Transpose two words. |- | <tt>ESC .</tt> || Insert the last argument (word) from the previous command. |- | <tt>CTRL-X-X</tt> || Move between end of line and current cursor position |} {| |+ Table 2. Common control key bindings |width="80pt"| <tt>CTRL-C</tt> || Terminate the current program, or sometimes cancel some operation. |- | <tt>CTRL-\</tt> || Seriously kill the current program! Use only after <tt>CTRL-C</tt> has failed. |- | <tt>CTRL-D</tt> || End-of-file. This is often used to signal the end of input, or to exit a program. |- | <tt>CTRL-G</tt> || Cancel the current operation. An occasionally useful command to get yourself out of things. |- | <tt>CTRL-L</tt> || Redraw the console. Mostly useful if some program running in the background spews a lot of stuff onto your terminal. |- | <tt>CTRL-Q</tt> || The only time you need this is if you accidently hit <tt>CTRL-S</tt>. In that case the console is locked until you hit CTRL-Q to unlock it. Apparently once a long long time ago this was actually a useful feature. |- | <tt>CTRL-R</tt> || Recall command containing characters. After hitting <tt>CTRL-R</tt>, type the fragment you want to search for. If it returns a command which isn't the one one want, hit <tt>CTRL-R</tt> again to cycle through matches. |- | <tt>CTRL-Z</tt> || Suspend the current program and put it in the background. This is very useful once you figure out how it works. Refer to the section on putting jobs in the background. |} [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====Using scp to copy files between computers==== scp is a secure copy command that works bewteen computers. Typically any computer that supports ssh also supports scp. You must have an actual user account on the target computer, so for example you typically won't be able to scp to mike.kin . scp works just like the cp command, with a few extra decorations: scp eric@mighty-mac.kin.ucalgary.ca:Documents/important_file.txt . In this example the file I want to copy is on the computer mighty-mac.kin.ucalgary.ca, and I used eric@ to specify my user name. You can leave off the user name if it is the same on both computers. The period as the destination is just standard Unix short-hand for the current directory. You can use the -r flag to copy whole directories. For example: scp -r calculations mighty-mac.kin.ucalgary.ca:Documents/Projects In this example calculations is a directory containing many files, and possibly subdirectories. This example copies files to mighty-mac instead of from it. [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====Running long calculations==== Here are some useful tips for running long jobs. =====Getting the prompt back after starting a job===== Use & at the end of the command. This puts the job in the background. For example: ./myjob someargs & To see all your background jobs (the ones started in the current shell), enter: jobs To bring one of these to the foreground, use: fg %n where <tt>n</tt> is the job number (yes it needs a <tt>%</tt> in front of it). To move it to the background again, hit CTRL-Z. This however doesn't just move the job to the background, it suspends it. To get it running again, use bg %n [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] =====Keeping a job running after you log out===== Use nohup. For example, suppose you want to run <tt>./myjob 20</tt>. In this case, you could use: nohup nice ./myjob 20 &> output & There are several things to note here: * The <tt>&</tt> at the end of the command line is there so you get the command prompt back immediately (see the previous section). * We have redirected the output to a file out_file with <tt>&> output</tt>. If you don't do this, any output to STDIN (normally the console) will automatically go into a file called <tt>nohup.out</tt>. * We've niced the job to reduce it's execution priority. This is courteous if you're a multiuser system. If you want to see what's in nohup.out (or whatever you called it) at any time, you can do the usual cat nohup.out Here's another potentially more useful command: tail -f nohup.out tail shows you the last few lines of the files. In addition, the -f flag ("follow") means that as lines get added to the file, they are displayed on the screen. This looks just like when you run the program without nohup, except when you hit CTRL-C, the program keeps on running in the background. [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] =====Finding out if any of your jobs are still running===== This command will show all jobs that belong to user "eric": ps -u eric Another useful command is "top", which will show interactively which processes are using the most processor cycles. [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] =====Terminating a job prematurely===== If you decide that you want to kill the job before it completes, this is the command: kill PID where PID is the actual PID (a number) of the process. You find the PID with 'top' or 'ps -u eric' (replace eric by your user ID of course). Occasionally a process will decline to terminate when you request it to. This is the more brutal, never-fails method to kill a job immediately: kill -s KILL PID [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] =====Suspending a long-running job and restarting it later===== First find the PID (process ID) with top or with ps. For example, I might list all jobs belonging to me with: ps -u eric To stop the job, send it a STOP signal: kill -s STOP PID (replace PID with the actual PID number). It is now no longer running, but it still occupies memory (although the memory it uses will probably be swapped out to disk). When you want to resume execution, give it a CONT signal: kill -s CONT PID [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ==Graphical Applications== ===Calendar - Fix corruption=== Sometimes the calendar file can be corrupted, which is annoying every time you log onto the system. When we login to a server through a workstation, there is a "File is not a Calendar Datafile." information message pops up. This means that the calendar database got corrupted during an improper interruption such as a system crash due to a power outage. To fix this, you will need to login to the Server through the Workstation Once logged in: cd xdefaults dir *calendar*.dat /date Delete the calendar file for the workstation, such as the following James workstation: del decw$calendar_sc3401.dat Once logged out and logged in again, you will be asked if you want to create a new calendar file. Say "yes" there and a new calendar will open. In the calendar window menu "options" -> "general" set the "start iconized" -> apply and "ok", then "options" -> "save settings". So next time you log in, the calendar window will be minimized in the right lower corner. [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ===Session Manager - Create a customized button=== The session manager part to enable the double-click on the AIM file: Session Manager, 'Options', 'Menu', enter new item SAP with command: <pre> @decw$user_defaults:sap$vue </pre> Then move that menu point into 'Applications' menu. Also: 'Options', 'File types', Create 'AIM' file type. Move 'rename', 'copy', 'purge' etc. into menu, Select 'SAP', click on 'Change double click', and also move SAP into menu. [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ===EVE Editor=== ====Launch EVE editor==== On the command line $ edit/display=decwindows/tpu fname.txt Or to set it up permanently, edit <code>DISK1:[MICROCT]MICROCT_SETUP_USER.COM</code> to include [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====Configure EVE editor==== The following file, called <code>tpu.dat</code>, should be installed in <code>disk1:[microct.xdefaults]:</code> <pre> # # DECTPU V3.1 1993-04-22 15:50 defaults # CHANGED B.KOLLER 21-JUN-90 # # Copyright (c) 1993 Digital Equipment Corporation. All rights reserved. # # # The following are all the resource names that DECTPU supports. # Tpu.Tpu$MainWindow.Title: DECTPU Copyright Β© Digital Equipment Corporation 1992. All Rights Reserved. Tpu.Tpu$MainWindow.ApplicationTitle: DECTPU Tpu.Tpu$MainWindow.IconName: DECTPU Tpu.Tpu$MainWindow.X: 610 Tpu.Tpu$MainWindow.Y: 0 # # The following resource names are commented out so that users can specify # *rows and *columns and have DECTPU obey those directives. If DECTPU finds # finds no resource names governing the number of rows and columns it should # have, it uses 24 rows and 80 columns. # # Tpu.Tpu$MainWindow.Columns: 80 Tpu.Tpu$MainWindow.Rows: 56 *EVE_MENU_BAR*background: #ADADADADADAD Tpu*XmScrollBar*background: #ADADADADADAD Tpu*XmDialogShell*background: #ADADADADADAD Tpu*XmMenuShell*background: #ADADADADADAD *background: white Tpu*condensedFont: OFF Tpu*fontSetSelection: 0 # 0 = big font # 1 = little font # 2 = GS font (German Standard) # 3 = Fine font (used only for non-latin 1 fonts?) </pre> [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====EVE editor Commands==== * mark -> ctrl-space * delete -> remove (delete) * insert -> insert here (insert) * learn -> ctrl-k (ctrl-r to stop) * The right 'alt' key on the PC accesses the menu for EVE. {| class="wikitable" | copy | <code><PF1><Remove></code> on VMS |- | paste | <code><Insert Here></code> on VMS <i>or </i> <code> <ctrl><insert></code> on PC |- | cut | <code><Remove> </code> on VMS <i>or </i><code><delete> </code> on PC |- | learn | <code><CTRL><K></code> |- | stop | <code><CTRL><R> </code> (then give a key sequence such as <code><CTRL><Q></code>) |- | repeat | <code><PF1><#><(CTRL-Q)> </code> (the <code>CTRL-Q </code> depends on the given key sequence). |- | find next | <code><PF3></code> |- | enter search string | <code><PF1><PF3></code> |- | replace string | <code><PF1><S></code> |- | margins | Mouse click bottom of window type: <code>set right 999</code> |- | kill line | <code><PF4></code> |- | kill word | - (minus key on number pad) |- | advance next line | <code>0</code> (zero on number pad) |- | select text | <code><CTRL><SPACE></code> |} *To avoid having the EVE editor automatically create multiple lines from a long input sequence set the margins [FORMAT - SET MARGINS] to some high number eg. 500. [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====Use Commands Remotely with XWin32==== Default key settings: {| class="wikitable" | remove (cut) and append to previous paste buffer | <code>9</code> (nine on number pad) |- | paste | <code><insert></code> |- | learn | <code><CTRL><K></code> |- | stop | <code><CTRL><R></code> (then give a key sequence such as <code><CTRL><Q></code>) |- | repeat | <code><CTRL>-Q</code> or given key sequence |- | kill word | - (minus key on number pad) |- | advance next line | <code>0</code> (zero on number pad) |- | go to end of line | <code>2</code> (two on number pad) or <code><CTRL><E></code> |- | go to start of line | <code><backspace> or <CTRL><H></code> |- | go to start of word | <code>1</code> (one on number pad) |- | delete line to left of cursor | <code><CTRL><U></code> |- | turn on/off select text | <code><CTRL><SPACE> or .</code> (on number pad) |- | select all text | <code><CTRL><O></code> |- | turn on/off overstrike | <code><CTRL><A></code> |- | save and exit | <code><CTRL><Z></code> |- | enter command | <code><CTRL><B></code> |} You may find it useful to define keys. For example, define keys to cut, copy and paste: *To Cut <code><CTRL><X></code>: :<code><CTRL><B></code> (enter command) :Command: <code>define key=Ctrl/x cut</code> *To Copy <code><CTRL><C></code>: :<code><CTRL><B></code> (enter command) :Command: <code>define key=Ctrl/c copy</code> *To Paste <code><CTRL><V></code>: :<code><CTRL><B></code> (enter command) :Command: <code>define key=Ctrl/v paste</code> [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====Use terminal based editor (EVE)==== <pre> $ edit file.txt </pre> If you are using this from a remote terminal, you will need to initiate a vt100 terminal. <pre> $ set term /vt100 </pre> Some useful commands: :* ctrl-z -> exit with save :* ctrl-y -> kill without saving :* do-key, then type 'quit' or 'exit' (what is the do key on a remote terminal?) :* PF2 -> shows special keypad functions :* GoldKey -> PF1 ====Use EVE editor Remotely==== For remote sessions, once used $ EVE to start the text editor, press Ctrl-B to bring up a command line at the bottom of the screen. *Command: @eveconfig This will set backspace to delete normally. *Ctrl-X cut *Ctrl-C copy *Ctrl-V paste *Ctrl-S save file *Ctrl-L learn command *Ctrl-F find next *Ctrl-Q quit *Ctrl-O open *Ctrl-space to select [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ===Scout Views=== ====Understanding scout views==== Each time a participant is scanned a scout view is generated for each skeletal site. There are two copies kept of the scout view: 1. In the measurement directory. <pre> $ dir DISK2:[XTREMECT2.DATA.00002836.00014976]*.SCV Directory DISK2:[XTREMECT2.DATA.00002836.00014976] D0013035.SCV;1 Total of 1 file. </pre> 2. In the common directory. <pre> $ dir DISK1:[XTREMECT2.DATA.SCOUTS]*00002836* Directory DISK1:[XTREMECT2.DATA.SCOUTS] 00002836020.SCV;1 00002836021.SCV;2 00002836021.SCV;1 00002836038.SCV;1 00002836039.SCV;1 Total of 5 files. </pre> A scout view is created each time a patient is scanned. That is stored in the measurement directory. For follow-up scans, the scout view shown is whatever was stored in the common directory (not the measurement directory). [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====Naming convention of scout views==== The scout view stored in the measurement directory follows the same format as all the other files associated with that measurement (e.g. D0013035.SCV). The scout view stored in the common directory is named according to an eight digit patient number (e.g. 00002836), followed by a "0", followed by a two digit skeletal site code (RL=20, RR=21, TL=38, TR=29). The following scout view is for patient 2836 at the left radius (20): <pre>DISK1:[XTREMECT2.DATA.SCOUTS]00002836020.SCV</pre> [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====Viewing and printing a scout view==== You can use <code>ximage</code> as follows: <pre> $ x DISK1:[XTREMECT2.DATA.SCOUTS]00002836020.SCV </pre> Or you can load <code>uct_evaluation</code> and select the scout view radio button. Using either method, simply print the scout view to a printer or file. [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====Scout views on the microCT cluster==== VivaCT side: <pre> $ cd ADISK1:[VIVACT.DATA.SCOUTS] </pre> [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====Reassignment of Scout Views==== Sometimes you may want to manipulate what scout view is shown to the operator at the time of a follow-up exam using <code>uct_measurement</code>. This involves making changes in the common directory (e.g. DISK1:[XTREMECT2.DATA.SCOUTS]). Note that any changes made to the scout view stored in the measurement directory will not influence what is shown by the <code>uct_measurement</code> program. One <b>scenario</b> may be that there are two versions of the same scout view. The <code>uct_measurement</code> program always displays the most recent version. You can see an example here with two versions (you would just rename files appropriately so that the most recent version is what you want shown): <pre> $ dir DISK1:[XTREMECT2.DATA.SCOUTS]00002836021.SCV* Directory DISK1:[XTREMECT2.DATA.SCOUTS] 00002836021.SCV;2 00002836021.SCV;1 Total of 2 files. </pre> Another <b>scenario</b> is that you want a scout view associated with a specific patient number. If we scanned somebody as CAMOS_0456 (patient ID 1248) years ago and today we want to scan them as CABHS_8765 (patient ID 2946), then we make a copy of the scout view for each skeletal site. In this example there is a radius left and tibia left site, so two files need to be copied: <pre> $ cd DISK1:[XTREMECT2.DATA.SCOUTS] $ copy 00001248020.SCV 00002946020.SCV $ copy 00001248038.SCV 00002946038.SCV </pre> When <code>uct_measurement</code> is started and CABHS_8765 (patient ID 2946) is loaded the operator will now see the scout views. [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ==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'']] ==Administrative Commands== ===User accounts=== The <code>xtremect2</code> and <code>xt2recalib</code> passwords are the same and have all the same settings, except data disks DK0 points to DISK2 or to DISK6, respectively. The <code>bonelab</code> and <code>bonelabknee</code> passwords are the same and have all the same settings, except they point to DISK2 and DISK6, respectively. Any users who want to work at a VMS terminal should log in with <code>bonelab</code> or <code>bonelabknee</code>. This will ensure <code>uct_evaluation</code> is accessing the correct data. Any user who wants to remotely log into the system will be using SSH authentication at users <code>xtremect2</code> or <code>xt2recalib</code>. Access by SSH requires Steve to set up your SSH public key. He has instructions on how to do this in his list of SOPs. Any users who need to scan patients log into <code>xtremect2</code>, <code>microct2</code> or <code>xt2recalib</code> should use a password. This password is restricted to only a small handful of people. ====Set password on VMS system==== For OpenVMS access (which includes FTP, SSH as well) you can simply use: $ set password Also see https://wiki.vmssoftware.com/SET_PASSWORD We usually do the password change from system account for any users. It's easier as you can change any users password in the same tool. Here how this goes (as system): $ cd sys$system $ mcr authorize UAF> mod microct /pass=test1234 /nopwdlife /nopwdexp ... next user if wished ... UAF> exit Then you may have to update the password for Samba access as well, if users use Samba. And that's also a reason we do it all as system, as this can only be done there anyway. $ @samba$root:[bin]samba$define_commands $ pdbedit -x microct $ pdbedit -a microct and enter new password. ===Query commands=== ====Check licenses on VMS system==== This can be used to see what educational licenses (and other licenses) are currently on the system: <pre> $ SHOW LICENSE </pre> To apply for an educational license go to http://www.openvmsedu.com [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====Check MAC address of VMS system==== You can check them using the command $ mcr lancp sh dev/char For example, the result on percy.kin.ucalgary.ca gives Device Characteristics EIA0: Value Characteristic ----- -------------- 1500 Device buffer size Normal Controller mode External Internal loopback mode 00-02-A5-20-29-99 Hardware LAN address Multicast address list CSMA/CD Communication medium FF-FF-FF-FF-FF-FF Current LAN address 128 Minimum receive buffers 256 Maximum receive buffers Yes Full duplex enable Yes Full duplex operational TwistedPair Line media type 100 Line speed (mbps) Disabled/No Failset Logical LAN state 0 Failover priority [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ===Update commands=== ====Change hosts==== <pre> $ mcr latcp show service * ! and if it shows you SCTHIN: $ set host scthin ! or $ set host scthin/lat </pre> [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====Update OpenVMS Licenses==== This needs to be done on all the Calgary workstations, XtremeCT, vivaCT40/uCT35, and uCT100.<br> Request licenses from HP: *School Identification (for U of C): 855803-9502 *License type: OpenVMS VAX/Alpha (uCT100: OpenVMW Integrity) Layered Products? (Or try others) *Member of DSPP or AlicanceONE: No *Do you use a VAX or Alpha Emulator: No On every workstation, you need to check which licenses are loaded and update those with a termination date. <pre> $ show license Active licenses on node SCEVA3: ------- Product ID -------- ---- Rating ----- -- Version -- Product Producer Units PCL Activ Version Release Termination C DEC 0 0 100 0.0 (none) 1-OCT-2012 CMS DEC 0 0 100 0.0 (none) 1-OCT-2012 CXX-V DEC 0 0 100 0.0 (none) 1-OCT-2012 FORTRAN DEC 0 0 100 0.0 (none) 1-OCT-2012 LSE DEC 0 0 100 0.0 (none) 1-OCT-2012 MMS DEC 0 0 100 0.0 (none) 1-OCT-2012 VMSCLUSTER DEC 0 0 100 0.0 (none) 1-OCT-2012 OPENVMS-I64-FOE HP 4 1 0 0.0 (none) (none) </pre> *HP will provide you with a script file ([[media:Openvms_license_update_hp.docx |'''Example script from HP''' ]]) containing a large number of licenses. *Modify the script to contain only the relevant licenses and load the licenses ([[Media:Openvms_license_update.docx |'''Example modified script''']]). *Login as user: system *Re-check the licenses on the workstation to ensure that the termination date has been updated. *The date after expiry, if cannot log in, then there is a problem with the VMS Cluster license, which was installed by Scanco. Contact Mark Blanchard (mblanchard@scanco.ch) about this problem. [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====Understanding how to set default parameters with OpenVMS==== Here is how the files all hang together... LOGIN.COM is called automatically during login and calls ::MICROCT_SETUP.COM, which sets the scanner ID, data device, etc. This file calls ::::MICROCT_SETUP_COMMON.COM to create general settings. This file is located in DISK0:[MICROCT_COMMON] and calls ::::::MICROCT_FE.COM, if present, to setup the environment for Bert's FE program ::::::MICROCT_SETUP_SITE_SPECIFIC.COM to create local settings for all accounts (e.g. ICALC) ::::::MICROCT_SETUP_COMMON_*.COM, if present, typically to create application-specific settings for all accounts ::::::MICROCT_SETUP_GROUP_*.COM, if present, to create local settings for specific groups (e.g. group 3401) ::MICROCT_SETUP_USER.COM to create user-specific settings. Note that the $UM designation is the MAIN directory, and the location of the binary files. To see a list: $ dir DISK0:[MICROCT_COMMON.MAIN] This is where you'll find IPL_SCANCO_FE.EXE, IPL_SCANCO_M.EXE, etc. Lots of stuff here: Directory DISK0:[MICROCT_COMMON] 3309.DIR;1 DATABASE.DIR;1 DEMO.DIR;1 EVAL.DIR;1 MAIN.DIR;1 TEMPLATES.DIR;1 TIPS.DIR;1 UIL.DIR;1 UTIL.DIR;1 WWW.DIR;1 UE and other symbols like UT, UM, UU, etc, are kind of search-lists of directory. As you see in the example below: <pre> $ dir ue:iplv6_upat_redo_e5e6_xt2*.com /size/date Directory IDISK1:[XTREMECT2.][EVAL] IPLV6_UPAT_REDO_E5E6_XT2_FIX_GOBJ.COM;2 15KB 19-DEC-2019 09:53:04.69 IPLV6_UPAT_REDO_E5E6_XT2_FIX_GOBJ.COM;1 15KB 26-JUL-2018 07:22:37.54 IPLV6_UPAT_REDO_E5E6_XT2_OLD.COM;1 15KB 19-DEC-2019 09:53:04.69 Total of 3 files, 45KB Directory IDISK0:[MICROCT_COMMON.][EVAL] IPLV6_UPAT_REDO_E5E6_XT2.COM;5 13KB 7-AUG-2017 14:31:15.91 Total of 1 file, 13KB </pre> UE shows files in the user specific eval directory and then the common files. "common" because these are common to all accounts on your system. If there is ever a file with the same file name in both locations, <b>it will always take the one on the specific directory</b>. Also if you save a file under ue:... it will be stored into your user specific directory. Common directories are protected and files in there cannot be changed by a "normal" user account. Only calibration accounts can do so, after evaluated privileges with <code>$ spb</code>. [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====Edit Symbol==== =====Edit SCANCO_SUBMIT_COMMAND===== *Check the current setting: <pre> $ show sym *submit* </pre> In directory <code>DISK2:[MICROCT]MICROCT_SETUP_USER.COM</code> add the following line: <pre> $ SCANCO_SUBMIT_COMMAND :== SUBMIT/NOPRINT/QUE=SYS$SLOW /NOTIFY/LOG=SYS$SCRATCH: </pre> Then end session and log in again. Definition of the symbol in the <code>MICRO_SETUP_USER.COM</code> supersedes the standard setting. [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] =====Edit AIX===== [[Image:Bones2.jpg|20px]] <b>Warning:</b> Extreme caution! Explicit permission for this change or similar changes <b>must</b> be obtained from Dr. Steven Boyd. Log in as user calibration (Xtremect: calibration; VivaCT40: calib5019; uCT35: calib2339), the password is the same as for the system user. Set priviledges to bypass. $ set proc/priv=bypass Or $ spb Change to the MICROCT_COMMANDS directory. $ cdc $ sea *.com aix $ eve microct_setup_common.com Edit the file which is called <code>MICROCT_SETUP_COMMON.COM</code> ''Another example'': To make the backspace/insert keys work properly, edit the <code>login.com</code> and insert the line <pre> $ set terminal/insert </pre> Anywhere suitable. [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====Setup Time==== =====Change system date and time===== The OpenVMS system should adjust for daylight savings, however, this is currently incorrect for the alpha systems. The alpha systems will need to be manually moved forward in March and moved back in April. To do this, you will need to login as system <pre> $ set host 0 user: system password: $ show time $ set time=dd-mmm-yyyy:hh:mm:ss/cluster !/cluster to change the time on all computers at once $ set time=01-APR-2012:18:00/cluster !Example: Set the system to April 1, 2012, 6 pm. </pre> [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] =====Set time zone===== As user system: $ @sys$startup:utc$time_setup Choose "CANADA" from the menu. Choose "MOUNTAIN" from the menu. [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] =====Disable Distributed Time Synchronization Service (DTSS)===== DTSS will automatically adjust the clocks for daylight savings (i.e., 2am to 1am on the 2nd Sunday in March, 2am to 3am on the 1st Sunday in November). As user system: $ mcr ncl disable dtss $ mcr ncl delete dtss $ eve sys$startup:sylogicals.com Add line to disable DTSS $ DEFINE/SYSTEM/EXEC NET$DISABLE_DTSS TRUE Save and exit. Now re-set the time zone. [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] =====Configure Network Time Protocol (NTP) server to synchronize clocks===== *NTP must be configured for each node (computer). Login as user system. NTP can only synchronize the system clock if the error is less than 1000 seconds. Synchronize the system clock to UofC's NTP server (ensures time is correct to within 1000s): $ mcr sys$system:tcpip$ntpdate ntp.cpsc.ucalgary.ca Enable NTP: $ cd sys$startup $ @tcpip$config 3 - Server components 12 - NTP 1 β Enable service on this node E β Exit menu E β Exit configuration procedure N β donβt start service Create the NTP configuration file: $ sys$sysroot:[tcpip$ntp] $ copy/log tcpip$ntp.template tcpip$ntp.conf $ eve tcpip$ntp.conf Comment out existing peer and server entries (# for comments). Add entries for local servers. server ntp.cpsc.ucalgary.ca server ntp1.cpsc.ucalgary.ca Save and exit. Start NTP: $ @sys$startup:tcpip$ntp_startup Check the log: $ type/cont/int=1 sys$sysroot:[tcpip$ntp]tcpip$ntp_run.log Sample log file: $ Set NoOn $ VERIFY = F$VERIFY(F$TRNLNM("SYLOGIN_VERIFY")) 11 Apr 09:22:34 ntp[547708872]: ntpd version = 4.1.0 11 Apr 09:22:34 ntp[547708872]: precision = 976 usec 11 Apr 09:22:34 ntp[547708872]: drift file 'SYS$SPECIFIC:[TCPIP$NTP]TCPIP$NTP.DRIFT' does not exist: no such file or directory 11 Apr 09:22:34 ntp[547708872]: will attempt to create drift file [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====Setup Email==== =====Setup email server===== The SMTP protocol is not enabled by default. If you use <code>tcpip$config</code> you can switch on the mail server under Client Components. As system: $ set host 0 user: system password: $ @SYS$MANAGER:TCPIP$CONFIG Or $ @tcpip$config -> 2 (client components) -> 6 (SMTP) -> 2 (Enable & Start services) *Select option 2 (client components) from the menu. *Select option 6 (SMTP) from the next menu to enable and start it. Since your smtp server is not registered anywhere, it can be that emails sent from this server will be filtered out as spam on the way to your mailbox. In that case you would need a so called MX record for your mail server. Contact UofC IT to resolve this issue. [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] =====Send an email===== Example: Send an email without an attachment. $ mail sys$scratch:email_message.txt/subject="email subject" "hbuie@ucalgary.ca,mkan@ucalgary.ca" Example: Send an email with an attachment. $ MIME :== $MIME.EXE $ MIME MIME> NEW /NOEDIT sys$scratch:file.txt MIME> ADD /TEXT thisattached.txt MIME> ADD /BINARY thatattached.zip MIME> ADD /MESSAGE this_is_written.txt MIME> SAVE MIME> EXIT $ MAIL /SUBJECT="MIME-encoded Message" - sys$scratch:file.txt "hbuie@ucalgary.ca,mkan@ucalgary.ca" $ *MIME> ADD /TEXT *.txt does not work [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ===Action commands=== ====Send a message to terminals==== <pre> $ reply /all "Merry Christmas to Bone Imaging Lab!" Reply received on SCEVA2 from user XTREMECT2 at _SCEVA2$FTA8473: 09:21:58 Merry Christmas to Bone Imaging Lab! 4 terminals have been notified on SCEVA2. $ 1 terminal has been notified on SCSRV2. $ 1 terminal has been notified on SC3309. $ 3 terminals have been notified on SCEVA1. $ </pre> [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====<code>mcr</code> vs <code>run</code> command==== The command <code>mcr</code> is the same as <code>run</code>, but only with mcr you can hand over 'in-line' parameters to an .exe file: <pre>$ run ut:ctheader.exe c000124.isq</pre> does not work, but you have to say <pre>$ mcr ut:ctheader.exe c000124.isq</pre> But funnily if you define a symbol in <code>microct_setup_user.com</code> (or <code>login.com</code>), <pre>$ ctheader :== $ut:ctheader.exe</pre> with just neither run nor mcr, but the 'funny' $ sign, then you can also hand over the ISQ name in-line. Small detail with big effect... [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====Using fda, pipe and search==== The <code>fda</code> (file do all) command in conjunction with <code>sys$pipe</code> and <code>search</code> can be quite helpful. Generally, use <code>fda</code> if you want to have a wildcard to capture many files in one command line, otherwise simply use <code>sys$pipe</code> and <code>search</code>. It's easiest to simply see examples. In this case, read the ISQ headers and use <code>...</code> to include all subdirectories: $ fda ctheader dk0:[microct.data.0001234...]*.isq Here we include all AIM files, no matter whether it's a C1234567.AIM or C1234567_SEG.AIM or whatever else: $ fda "aix -l" dk0:[microct.data.0001234.00005678]*.aim Note the use of double-quotes around the target of the <code>fda</code> command when there are more than one strings in the command. In this example we ensure the filename is exactly 8 characters using "%" instead of "*": $ fda aix dk0:[microct.data...]C%%%%%%%.AIM [[Image:Bones2.jpg|20px]] <b>Warning! </b> It's a good practise to always test your wildcard usage with <code>dir</code> before applying a large command: $ dir dk0:[xxx...]*.aim Combine <code>fda</code> with <code>sys$pipe</code> and <code>search</code>: $ pipe fda "aix -l" dk0:[microct...]*.aim | search sys$pipe "Slope" And you can redirect the output into a file: $ fda/output=sys$scratch:all_headers.log aix dk0:[microct...]*.aim $ pipe fda type *.log | search sys$pipe "BV/TV" /output=BVTV.txt $ pipe fda/output=sys$scratch:zscan.txt "aix -l" C%%%%%%%.AIM | search sys$pipe "Original Creation-Date","Index Patient","Index Measurement","Patient Name","Site","Time" Again, if the command consists of multiple words with spaces between (e.g. mcr ut:xxx.exe), then enclose the command in double-quotes. $ fda "mcr ut:uct_ext_header_display" dk0:[microct...]*.isq Grab more than one line using <code>pipe</code> and <code>search</code> command: $ pipe aix *.aim | search sys$pipe "dim", "pos", "name" Some common examples I use, without <code>fda</code>, are: pipe aix -l D0013580.AIM | search sys$pipe "Original file","Index Patient","Index Measurement","Patient Name","Site","Time" pipe ctheader D0013580.ISQ | search sys$pipe "Patient Name","Patient Index","Measurement Index","Creation Date","Site" [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====Putting multiple commands on a single line==== The key is to use the <code>PIPE</code> command. Basically separate all commands with ; <pre> $ pipe cd DISK2:[XTREMECT2.DATA.00003089.00016318] ; dir </pre> It has also some nice features of passing input and output along to the next command (see help), eg if you want to see the integration time of a certain scan : <pre> $ pipe ctheader C0014998.ISQ | search sys$pipe "Sampletime" Sampletime : 900000 [Β΅s] </pre> You can even submit a multi-line command to a remote computer using SSH: <pre> $ ssh -p22 -c 3des-cbc -o KexAlgorithms=+diffie-hellman-group1-sha1 -o HostKeyAlgorithms=+ssh-dss microct@12.618.196.561 'commands.txt' </pre> where 'commands.txt' can be replaced by 'pipe cd DISK2:[XTREMECT2.DATA.00003089.00016318] ; dir' [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====Make commands available to all users with symbols or paths==== DCL$PATH is one way to do that, WE don't use it... <pre> $ def dcl$path disk1:[microct.main],disk1:[microct.util] </pre> then, if you type <code> $ uct_t </code> it will first try to <code> $ @uct_t.com </code> and then <code> $ r uct_t.exe </code> however, we usually define it by giving full path: <pre> $ progx :== $disk1:[microct.main]progx.exe $ com_proc_x :== @disk1:[microct.main]procedure.com </pre> then, you can just type the shortcut ('symbol' in VMS language) We use the 'cd' to set the default path, you may also use this in your command procedure: <code>proc.com</code>: <pre> $ cd 'p1' $ dir *.*/size $ define COM disk1:[microct.commands] $ p :== @COM:PROC.COM </pre> these both go into <code>login.com</code>, but see the Wiki entry above to confirm exactly where... then, you can just type: <pre> $ p disk4:[microct.data.0000007.000009]*.ISQ </pre> [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ====Stopping disconnected sessions==== As <code>system</code> user you can check if there are any disconnected sessions, with <code>$ show user/full</code>: <pre> $ sh user/full OpenVMS User Processes at 5-JUN-2021 03:14:06.45 Total number of users = 2, number of processes = 7 Username Process Name PID Terminal MICROCT DECW$MWM 00000EA4 MBA6597: (disconnected) MICROCT DECW$SESSION 00000EA2 MICROCT VUE$MICROCT_3 00000EA6 MBA6601: (disconnected) MICROCT VUE$MICROCT_4 00000EA7 (subprocess of 00000EA2) MICROCT VUE$MICROCT_5 0000289E (subprocess of 00000EA2) MICROCT _FTA24: 00012284 FTA24: SYSTEM _FTA30: 000129DC FTA30: </pre> and kill any as follows: <pre> $ stop/id=00000EA4 $ stop/id=00000EA6 </pre> There may also be FTP connections that aren't closed properly. You can check for open FTP connection with this: <pre> $ sh sys/proc=tcpip$ftp* OpenVMS V8.3-1H1 on node SC4209 5-JUN-2021 03:12:53.14 Uptime 73 13:39:10 Pid Process Name State Pri I/O CPU Page flts Pages 00000426 TCPIP$FTP_1 LEF 9 786428 0 00:00:12.51 1089 751 N 000129E0 TCPIP$FTPC00046 HIB 4 106 0 00:00:00.03 431 353 N </pre> and again kill any with: <pre> $ stop/id=000129E0 </pre> But <b>DO NOT</b> kill the <code>TCPIP$FTP_1</code> as this is the actual FTP server process. Remember, in a cluster there will almost always be other open sessions which have their DECW$SM.LOG files locked. You don't need to delete them all! [[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