Logo

Oracle Useful Information

UNIX to VMS Translation Table

 

Updated : 2-October-2000
Version : 1.1

Description

This is an of the most common UNIX command Oracle users need an the corresponding VMS command..

Table

UNIX

VMS

NOTES

UNIX EXAMPLE

VMS EXAMPLE

crontab [ -le ]

SUBMIT filespec[,...] /QUEUE=queue-name[:]

These commands allow command scripts to be executed at given times, but both are fundamentally different implementations. VMS had a full batch queue system capabilities where queue characteristics (e.g. CPU, Elapsed time limits) can be set.

crontab -l

SUBMIT /CHAR=(33)/QUEUE=BLONG1/LOG=JOB.LOG/NAME="Batch Job" /NOTIFY/PARAMETERS=(1,2,3)

$HOME

SYS$LOGIN

Home directory

 

 

.profile

LOGIN.COM

Login execution script. Both the .profile and LOGIN.COM reside in the users home directory. System administrators have access to global versions of these files which run before the users version.

 

 

/etc/passwd

SYS$UAF

User Authorization file

 

 

/tmp

SYS$SCRATCH

Temporary Areas

 

 

cat [filename...]

TYPE filespec[,...]

Displays the contents of a file or group of files on the current output device

cat oldfile.lis

TYPE OLDFILE.LIS

cd [ dir ]

SET DEFAULT [device-name[:]][directory-spec]

Sets your default device and directory specifications or working directory

cd /home/user1

sd USER_DISK:[USER1}

chmod symbolic_mode_list file … chmod numeric_mode file …

SET PROTECTION[=(code)] filespec[,...] SET FILE filespec[,...] /PROTECTION[=(ownership[:access][,...])] SET FILE /ACL object-name

Change the security level of one or more files.

chmod 777 file1 chmod +rx file2

SET PROT=W:RWED FILE1.TXT SET ACL * /LIKE=(object_name=<sss>)

chown owner[:group] file …

SET FILE filespec[,...] /OWNER_UIC[=uic]

Change the file owner or group

chown oracle:dba /dbs1 chgrp dba /dbs2

SET FILE/OWNER=ORACLE ORA_DISK:[000000]*.*

cp source_file target_file

COPY input-filespec[,...] output-filespec

Creates a new file from one or more existing files

cp -p file1 file2 cp -r ./project1/* ./project2/.

COPY/REPLACE/LOG [.PROJECT1]*.*;* [.PROJECT2]*.*

date

SHOW TIME

Displays the current date and time.

date

SHOW TIME

df [-o specific_options] [special|directory]...

SHOW DEVICES /MOUNTED [device-name[:]]

Display disk and device information, including totals and free space

df -k

SHOW DEVICE /MOUNTED

ed [ filename]

EDIT/EDT [file-name]

Standard Text Editor

ed newfile.lis

EDIT/EDT NEWFILE.TXT

export [ name[=value] ]

ASSIGN equivalence-name[,...] logical-name[:] DEFINE logical-name equivalence-name[,...]

Assign logicals/enviroinment variables.

export ORACLE_SID=db1

DEFINE ORACLE_SID db1 ASSIGN db1 ORACLE_SID

find path...expression

DIR

Find files with a given characteristic.These two are not generally equivalent, but the some UNIX find commands can be acheived with the VMS DIR command.

find . -mtime -1

DIR /SINCE=TODAY

fuser -cu [device]

SHOW DEVICE/FILE

Identify processes using a file or file structure

fuser -cu /home

SHOW DEVICE /FILE

grep limited-regular-expression [ filename ... ]

SEARCH filespec[,...] search-string[,...]

Searches one or more files for the specified strings and displays the lines containing those strings.

grep -i "text" oldfile.lis

SEARCH *.TXT TEXT

id

F$USER

Current User. Two commands in VMS, but you can get the same information by VMS command SHOW PROCESS

id

UIC = F$USER SHOW SYMBOL UIC

kill [signum] pid ...

STOP [process-name]

Terminates execution of a command, an image, a command procedure, or a detached process or subprocess.

kill -9 12345

STOP /ID=20200896

lp [ -d dest ] [ file... ]

PRINT filespec[,...] /QUEUE=queue-name[:]

Queues one or more files for printing to an output queue.

lp -d lp0 myfile.lis

PRINT/QUEUE=LASER1 MYFILE.TXT

ls [ file... ]

DIRECTORY [filespec[,...]]

Provides a list of files or group of files.

ls *file*

DIR *FILE*.LIS;3

ls -l [ file... ]

DIRECTORY/FULL [filespec[,...]]

Provides information about a file or group of files.

ls -ltr /usr/users1/*file*

DIR/FULL USER_DISK:[USER1]*FILE*.LIS;

mkdir dir...

CREATE/DIRECTORY directory-spec[,...]

Creates one or more new directories or subdirectories.

mkdir ./newproject

CREATE/DIR/LOG [.NEWPROJECT]

more [filename …]

TYPE/PAGE filespec[,...]

Browse or page through a text file.

more oldfile.lis

TYPE/PAGE OLDFILE.LIS

ps -ef ps aux

MONITOR SYSTEM SHOW SYSTEM /BATCH SHOW SYSTEM /INTERACTIVE SHOW PROCESS /CONTINUOUS/ID=pid

Displays status information about current processes

ps -ef | grep -v grep | grep 12345

SHOW PROCESS /ID=12345/CONT

PS1

SET PROMPT[=string]

VMS has a command to set the login prompt, UNIX has an environment variable PS1

export PS1="$ >"

SET PROMPT="$ >"

pwd

SHOW DEFAULT

Displays the current default device and directory.

pwd

SHOW DEFAULT

rdist -c name... [ login@]host[:dest ] rcp source_file1 dest_file

COPY input-filespec[,...] node["]username password["::]output-filespec

Copy files between remote nodes.

rcp -p file1 host1:/home/file2

COPY/LOG FILE1.TXT NODE"user1 user1"::[PROJECT2]FILE2.TXT

rm file…

DELETE filespec[,...]

Deletes one or more files from a mass storage disk volume. VMS also has the ability to PURGE files since each file created has a version number associated. As files are edited, new versions are created in VMS, whereas in UNIX, the file is overwritten.

rm -fr /temp/*

DELETE [TEMP…]*.*;*

rmdir dirname...

DELETE filespec[,...]

Remove directory Entries.Within VMS a DIRECTORY is a file, so there is no specific remove directory command. The protection of VMS directories needs to be set deleting the directory.

rmdir newproject

DELETE NEWPROJECT.DIR;

Standard Output

SYS$OUTPUT

Can be directed to a file.

 

 

type/etc/passwd lsuser myuser

run sys$uaf:authorize SYSUAF > show myuser

List user details.

 

 

typeset -l FILE=UUU

F$EDIT(FILE,"UPCASE")

Convert to uppercase

 

 

typset -u FILE=uuu

F$EDIT(FILE,"LOWERCASE")

Convert to lowercase

 

 

uname

F$GETSYSI

Returns status and identification information about the local system

uname -a

NODE = F$GETSYI("NODENAME") SH SYM NODE

unset [ name ... ]

DEASSIGN [logical-name[:]]

Unassign logicals/environment variables

unset ORACLE_SID

DEASSIGN ORACLE_SID

uptime

show system/noprocess/full

Show how long the system has been up.

uptime

show system/noprocess/full

vi [ filename]

EDIT/TPU [file-name]

Enhanced Text Editors

vi newfile.lis

EDIT/TPU NEWFILE.TXT

view [ filename]

EDIT/TPU/READ_ONLY [file-name]

Edit file read only.

view newfile.lis

EDIT/EDT/READ NEWFILE.TXT

who -u

SHOW USERS [username] /FULL

Displays the user name and node name of users on the system

who -u

SHOW USERS * /FULL

 

PURGE [filespec[,...]]

Deletes all but the highest numbered versions of the specified files.

 

PURGE/LOG/KEEP=3 OLDFILE.TXT

 

SHOW QUEUE [queue-name]

Displays information about queues and the jobs that are currently in queues

 

SHOW QUEUE/BATCH/FULL

 

SET PROCESS/PRIV=ALL

Enable all VMS provileges

 

 

ldd [filename ...]  

ANALYZE /IMAGE [filespec[,...]]  

List Dynamic Dependancies or Analyze a VMS executable

ldd oracle

ANALYZE /IMAGE ORACLE.EXE

Return to Index of SQL Scripts


Home | Company Profile | Services | Contact Us | SQL scripts and tips | Quiz
Legal

Logo