Вы находитесь на странице: 1из 8

Sheet1

OpenVMS Commands with Unix Equivalents


VMS command
APPEND
x=,x:=
x==,x:==
ASSIGN,DEFINE
DEFINE
DIRECTORY
ATTACH
BACKUP
BACKUP/INIT
BACKUP/LIST
BACKUP/LOG
BACKUP/NOREWIND
BACKUP/RECORD
COPY
COPY/CONFIRM
COPY/FTP or FTP
COPY/RCP, RCP,SCP,SFTP
CREATE
CREATE/DIRECTORY
CREATE filename
DEBUG
DELETE
DELETE/CONFIRM
DELETE/ENTRY
DELETE/QUEUE
DELETE/LOG
DELETE/SYMBOL
DELETE x.DIR;
DIFFERENCES
DIFF/MAXIMUM_DIFF=1
DIFF/NUMBER NL:
DIFF/SLP
DIRECTORY [...]
DIRECTORY [...]
DIRECTORY *.DIR
DIRECTORY
DIRECTORY/BY_OWNER
DIRECTORY/COLUMN
DIRECTORY/DATE
DIRECTORY/FULL
DIRECTORY/TOTAL
DIRECTORY/MODIFIED/SINCE [...]
DIRECTORY/MODIFIED /BEFORE [...]
DIRECTORY/OWNER
DIRECTORY/SIZE
DISMOUNT/UNLOAD
DUMP
DUMP/HEXADECIMAL
DUMP/OCTAL
EDIT/EDT,EDIT/EVE,EVE
EDIT/RECOVER
Page 1

Sheet1
EXCHANGE
EXIT
HELP
HELP HINTS
INQUIRE/NOPUNCTUATION
INITIALIZE device:
LIBRARY
LIBRARY/CREATE
LIBRARY/EXTRACT
LIBRARY/INSERT
LIBRARY/LIST
LIBRARY/REPLACE
LINK
login procedure
LOGOUT
MAIL
MERGE
MOUNT
ON COUNTROL_C THEN
ON CONTROL_Y
PHONE
PRINT
PRINT/COPIES=n
PRINT/DELETE
PRINT/FORM
PRINT/FORM
PRINT/FORM
PRINT/HEADER
PRINT/NAME=jobname
PRINT/NOFLAG
PRINT/NOTIFY
PRINT/PAGES=(n,?)
PRINT/QUEUE
READ
RECALL/ALL
REPLY/USER
RENAME
RENAME/CONFIRM
SEARCH
SEARCH/MATCH=NOR
SEARCH/NOEXACT
SEARCH/NUMBERS
SEARCH/STATISTICS
SEARCH/WINDOW=0
SEARCHfile pattern/WINDOW=5
SEARCHfile pattern/WIND=(5,0)
SET DEFAULT
SET FILE/OWNER
SET FILE/PROTECTION
SET FILE/ENTER
SET HOST
SET HOST/DTE
SET HOST 0/LOG
Page 2

Sheet1
SET PASSWORD
SET PROCESS/PRIORITY
SET PROTECTION/DEFAULT
SET TERMINAL
SET VERIFY
SHOW DEFAULT
SHOW DEVICE/FULL
SHOW LOGICAL
SHOW PROCESS/ALL
SHOW/QUEUE
SHOW STATUS
SHOw TIME
SHOW USERS
SORT
SORT/KEY
SORT/OUTPUT
SPAWN/NOWAIT
STOP/ID
SUBMIT
TYPE
TYPE/PAGE=SAVE
TYPE/PAGE NL:
WRITE file
WRITE file
WRITE SYS$OUTPUT

OpenVMS Mathematical Operators Function Equivalents


.EQ.
.EQS.
.NE.
.NES.
.AND.
.OR.
.GT.
.GTS.
.GE.
.GES.
.LT.
.LTS.
.LE.
.LES.
+
*
/
var + 1
var - 1
.NOT.
.NOT.
.OR.
.AND.

OpenVMS Lexical Function and Unix Equivalents


F$ENVIRONMENT("INTERACTIVE")
F$EXTRACT(start,length,string)
Page 3

Sheet1
F$ELEMENT(element#,delimiter,string)
F$ENVIRONMENT("PROCEDURE")
F$TRANSLATE("SYS$SYSDEVICE")
F$GETDVI("TT:","DEVNAM")
F$GETSYI("HW_NAME")
F$GETSYI("HW_MODEL")
F$GETSYI("VERSION")
F$GETSYI("PHYSICALPAGES")
F$GETSYI("BOOTTIME")

Unix Branching Statements

DCL command procedures rely on the statements if, gosub, call, and goto for program branching. The shells under unix offer several b
Shell Branching Statements Offered
csh if, goto, while, foreach, switch, shift
ksh do, case, elif, for, function, if, select, time, until, while
sh if, for, while, until, case
Debugging of shell scripts is done by invoking ksh or sh scripts with the -x and -v flags. Debuging of C shell scripts by invoking them
flags. The result is like using the OpenVMS command set verify.

Debugging Shell Scripts

This html file is based on a text file saved from comp.os.vms years ago, credit goes to the unknown author; I don't claim any Copyrigh
J.Huber March 1998

Page 4

Sheet1

mmands with Unix Equivalents

Unix equivalent
command.cat file1 >> file2
#N/A
same as = followed by export
if file,directory alias definition: ln , ln -s hard and soft links
variable definitions (no real equivalent!)
ls
fg
tar or pax : back up files into a tar file.
tar -c or pax : Restore files.
tar -t : List contents.
tar -v : Report progress.
tar -r : Write at end of existing backup (tar) files.
tar -m : Update file's modification date upon restore.
cp : Copy a file
cp -i : Confirm before copying.
ftp : Copy to/from a nontrusted remote host.
rcp,scp,sftp : Copy to/from a trusted remote host.
touch : Create or update a file.
mkdir : Create a subdirectory.
cat >filename : create a file from keyboard input
dbx : Debug a program.
rm : Delete a file.
rm -i : Confirm deletion.
lprm : Remove queued line printer job.
lprm -P : Remove all jobs from the queue.
rm -e : Delete files and list them as they are deleted.
unset : Get rid of an environment variable.
rmdir : Delete an empty subdirectory.
diff : Display all differences in files or directories.
cmp : Display first difference in two files (typically used with binary files).
cat -n : Display a file with line numbers.
diff - e : Generate editing changes for the ed editor.
ls -R : Do a recursive directory/list of files.
find : Find a file
ls -d : List directory name(s) only ls -Rd
ls : List files.
ls -l dir | grep owner : List only those files owned by a specifed user.
ls -1 : List one file per line.
ls -c : List by creation/last modification.
ls -l : Long listing.
du : Summarize disk usage.
find -mtime +n : Modified more than n days ago.
find -mtime +n : Modified more than n days ago.
ls -g : Include group (used with |).
ls -s : Include size.
mt rewofmt offline : Rewind and unload the tape.
od : Dump a file in various formats.
od -h : Hexadecimal dump.
od -o : Octal dump.
vi : Screen editor session.
vi -r : Recover a screen editing session.
Page 5

Sheet1
dd : Back up, restore, and convert nonstandard files.
exit : Terminate a script.
man : Display online reference pages.
man -k topic : Display a list of commands that correspond to the specified topic.
read choice? : Prompt for a responce and put the response into an environment variable.
fddisk -fmt device : Format a diskette.
ar : Library maintainer.
ar -cr : Create library.
ar -x : Extract modules.
ar -q : Insert modules.
ar -t : List modules.
ar -r : Replace modules.
ld : Link compiled source code into an executable image.
On OpenVMS, LOGIN/CLI specifies an alternate command language interpreter.
logout C shell exit Bourne and Korn shell Terminate a terminal session.
mail : Invoke the mail utility.
sort -m : Merge sorted files.
mount : Mount a tape.
trap 2 : Enable handler for Stop signal.
onintr : On interrupt.
talk tty name : Communicate interactively with another user.
lpr : Print a file on the default line printer.
lpr -#n : Print n copies.
lpr -r : Remove file after printing
lpr -ln : Make page n lines (default = 66)
lpr -n : Print n column output.
lpr -wn : Set line width to n
pr -h string | lpr : Print a header on each page.
lpr -Jjobname : Include job name on the first page of the job.
lpr -h : Print with no header page.
lpr -m : Send mail upon completion.
lpr +n : Begin printing on page n.
lpr -Pqueue : Print a file on the specified queue.
read : Read input (korn shell)
history : Recall command lines
write : Send a brief message to a logged-in user
mv : move/rename a file(s)
mv -i : confirm the move/rename of a file(s)
grep : Search files for strings.
grep -v : List only lines that do not match
grep -i : Ignore case distinctions.
grep -n : Precede each match with line number.
grep -c : List only a file name that contains match
grep -l : Return only file name(s) that contains match
more -5 +/pattern file : Display search line plus two lines before and after. (Terminate with q).
cat file | more -5+pattern : Display search line plus next five lines.
cd : Change directory.
chgrp : Change group ownership of a file.
chmod : Change file protection.
ln : make file alias, create link.
rlogin : Network login to trusted host.
tip : Dial remote host.
script : Record a transcript of a terminal session.
Page 6

Sheet1
passwd : Change you local password.
nice or renice : Change the priority of a process.
umask : Change default protection for files not yet created.
tset or stty : Set terminal characteristics.
ksh -x orcsh -x : Verify command or script execution. Echo after variable substitution.
pwd : Display current directory.
df : filesystem Display information on a file system
printenv : Display environment characteristics.
ps -l : Dislay all processes on system.
lpq : Display default print queue status.
time : Display resources used by a process.
date : Display date and time
who : Display the list of current system users.
sort : Sort and merge.
sort +fskip.cskip /-fskip.cskip : Starting/ending porint of sort key.
sort -o file : Direct output to file.
bg : Move a process to the background (command &).
kill -9 : Remove a process.
at : Start a process at a latter time.
cat : Display a file
more : Display a file, pausing after each page.
clear : Clear the terminal screen.
/bin/echovar > file : Create a file and write a string or the contents of a variable to it.
/bin/echovar >> file : Append a string or the contents of a variable to an existing file.
echo (c Shell) print (Korn) Write to standard output.

atical Operators Function Equivalents


Equal to
string Equal to
Not equal to
string Not equal to
Boolean and
Boolean or
Greater than
string Greater than
Greater than or equal to
string Greater than or equal to
Less than
string Less than
Less than or euqal to
string Less than or euqal to
add
Subtract
Multiply
Divide
Increment by 1
Decrement by 1
1's complement
Logical negation
Inclusive OR
And

Function and Unix Equivalents


Determine if you are an interactive user.
Locate fields in a test string and write them out.
Page 7

tements

Sheet1
Locate delimited fields in a test string.
Get name of currently executing script.
Get name of the device from which the operating system bootstrapped.
Determine the name of the terminal you are using.
Get model name of the CPU
Return workstation device type
Determine booted kernel's file name and system version.
Get the physical memory on a system.
Get system boot time.

the statements if, gosub, call, and goto for program branching. The shells under unix offer several branching statements.
d

, shift
select, time, until, while

ipts

by invoking ksh or sh scripts with the -x and -v flags. Debuging of C shell scripts by invoking them with the -v, -V, -x or -X
OpenVMS command set verify.

e saved from comp.os.vms years ago, credit goes to the unknown author; I don't claim any Copyrights.

Page 8

Вам также может понравиться