Operating System - OpenVMS
1822494 Members
2495 Online
109642 Solutions
New Discussion юеВ

VMS commands similar to Unix commands

 
ashanabey
Advisor

VMS commands similar to Unix commands


VMS commands similar to Unix commands

Hi I am unix guy with 0 experience with vms, Please some one help me map the unix commands with Open VMS commands

ls -l
ls -lt
ls -R
ls -ld
ls -lt |grep " "
df -k
how to find the running jobs
how to see the print que
how to see the cancel print que
how to see the crontab similar
how to find the boot disk
who to find what are the application installed
which file file system contain all applications

Thx!

Ashan
legend the heart and lend the hand
11 REPLIES 11
Volker Halle
Honored Contributor

Re: VMS commands similar to Unix commands

Ashan,

I'm an OpenVMS specialist, so I don't know what the commands you've shown do, but why not use GNV (GNU's Not VMS)

http://h71000.www7.hp.com/opensource/opensource.html#gnv

It should make a UNIX person feel at home on an OpenVMS system.

Some answer to your 'how to' questions:
>how to find the running jobs
$ SHOW SYSTEM

>how to see the print que
$ SHOW QUE/DEV/ALL

>how to see the cancel print que
?

>how to see the crontab similar
$ SHO QUE/BA/AL

>how to find the boot disk
$ SHOW DEVICE SYS$SYSDEVICE

>how to find what are the application installed
$ PROD SHOW HISTORY will show installed products

>which file file system contain all applications
?

Volker.
Willem Grooters
Honored Contributor

Re: VMS commands similar to Unix commands

Ashan,

Welcome to VMS world.

To begin with:
VMS is quite different to Unix:
- It does not have a rooted filesystem
- you have the facility to 'name' ANY location, file, or device by a logical name, ebentually hiding the actual location.
- The naming convention of directories and files is different.
- A concept of "process" is quite different
- There is a very strict security model. There is NO "su" in VMS
- There is a strict locking mechinism you cannot get around
- VMS is NOT! case sensitive.
- It has a online help facility. For any options, consult HELP!

There are quite a number of boks and sites that can guide you to this matter. Check in this forum, there have been some questions (and answers) for this.

Well, for your commands:

The equivalent for ls is DIR.
df in itself has no real DCL equivalent but you'll find what you need in SHOW DEVICE/FULL (There is a function (F$GETDVI) which will give you detailed information one by one.
All running jobs: SHOW SYSTEM
See print queue: SHOW QUEUE
Once a print job is cancelled (by the user) you won't see it (unless specified /RETAIN) If by the system, due to some error. it me show up in SHOW QUEUE as "Hold" or "Retained on error", but that needs to be specified with the PRINT command.
Similar to crontab - in some respect is the BATCH processing. To start a job in batch (the at command) use SUBMIT. To specify it to run on a given momen, use SUBMIT/AFTER=. There might be a possibility to run a job the way CRON works, but I'm not certain on that.
Bootdisk: SHOW LOGICAL SYS$SYSDEVICE
All applications: What has been installed (and when) MIGHT be shown using PRODUCT SHOW HISTORY, and using TYPE VMSINSTAL$HISTORY - but appliactions NOT installed with the default facilities on VMS cannot be found that easily.
The locations of system images can be found by the output of SHOW LOGICAL SYS$SYSTEM and SHOW LOGICAL SYS$COMMON. Other applications can be located anywhere...

As said: consult HELP for the required options. I don't know Unix so well that I can give you the exact details

Willem
Willem Grooters
OpenVMS Developer & System Manager
John Yu_1
Valued Contributor

Re: VMS commands similar to Unix commands

>ls -l

$ dir/sec/siz=all

>how to find what are the application installed
$ PROD SHOW PRODUCT

>which file file system contain all applications

$ INSTALL LIST

>how to find the boot disk

$ sho dev sys$startup
$ sho dev sys$sysdevice

Artificial intelligence is rarely a match for natural stupidity.
Bojan Nemec
Honored Contributor

Re: VMS commands similar to Unix commands

Hi,

I was (and I am a VMS guy) but when I started with Linux this howto help to me. It was written for VMS people who start with Linux but it will probably help also to you.

http://www.tldp.org/HOWTO/VMS-to-Linux-HOWTO/

Bojan
Hein van den Heuvel
Honored Contributor

Re: VMS commands similar to Unix commands

The is a Digital Press book "Unix for VMS Users" by Bourne which will work both ways.

ls -l
$DIR /FULL or for a single line:
$DIR /SECU/SIZE/DATE=MODI
ls -lt
There is no build in sorting, but more often than not the intend of the -lt will be:
$DIR/DATE/SIZE /SINCE= or /BEFORE=
ls -R
$DIR [...] ( and .. is [-] )
ls -ld
Does not apply really Directories are always called xxx.DIR;1 (the ;1 being version 1).
To look IN a directory
$DIR [xxx] in a subdirectory: [.xxx]
To look AT a directory
$DIR/SIZE/DATE [000000]xxx.dir

ls -lt |grep " "

Pipe's a an afterthough in VMS and ugly.
Grep = SEARCH with argument swapped

$PIPE DIR/DATE/SINCE | SEARCH SYS$PIPE " "

df -k

$SHOW DEVICE

Free advice:

- check out BASH for VMS SHELL, but do learn some DCL.
- switch to PERL for all scripts, but do lear some DCL
- "HELP" is your friend.
- Filenames have fixed compoments: name.type;version
- Find a VI... it does not come with VMS. Try EDIT.


Welcome!
Hein.
Antoniov.
Honored Contributor

Re: VMS commands similar to Unix commands

Hi Don,
welcome to VMS world :-)
Here you can find some link about unix-vms commands.
From unix to vms
http://www.think-forward.com/tips/Ivmsunix.htm
http://www.ctstateu.edu/help/unix/vms2unix.html
http://wwwvms.mppmu.mpg.de/vmsdoc/UNIX_VMS_CMD_XREF.HTML

From vms to unix
http://www.bc.edu/offices/ats/rits/research/hardware/howto/usingunix/vmstounix/
http://www.mssl.ucl.ac.uk/www_computing/buns/vms_to_unix.html

For Unix guy the best choice is GNV as Volker hinted you. After installation of GNV you can use bash shell.

Antonio Vigliotti
Antonio Maria Vigliotti
Antoniov.
Honored Contributor

Re: VMS commands similar to Unix commands

Ashan,
adding something else to previous posts ...

In VMS exists device (like windows);
example: DKA0:[USR.BIN]MYFILE.EXE

Root directory is [000000];
example: DIR DKA0:[000000]

Directory path is always between [ and ] and it's referred always from root.
example:

cd /usr
ls bin

SET DEF SYS$SYSDEVICE:[USR]
DIR [.BIN]

Files have more copies, called version; it doesn't exist in any other OS.
example (2 versions of myfile):
MYFILE.TXT;10
MYFILE.TXT;9

Antonio Vigliotti
Antonio Maria Vigliotti
Mobeen_1
Esteemed Contributor

Re: VMS commands similar to Unix commands

Ashan,

ls -l/ls -lt = dir/date/size (help dir)
df -k = sh dev d
jobs running = show entry *
print queue = show queue
cancel print queue = dele/entry=<>
crontab = we use queues
boot disk = sh log sys$sysdisk
applications installed = product show his
file system apps = sh log *app log name*

Its kind of difficult to directly translate from Unix to OpenVMS, as the ideologies of both these OS is totally different in some aspects as highlighted by many of our fellow colleagues here

Regards
Mobeen
Willem Grooters
Honored Contributor

Re: VMS commands similar to Unix commands

All above applies, but I'd like to add one thing, although it probably won't cover all your needs.
There is GNV - Gnu's Not VMS. Basicly developed to ease porting OpenSource (=Unix) programs to VMS but, since it is VMS (despite the name) you can use it interchangeably with DCL - for a part, given you have everything set up correctly. Extensive documentation comes with the package and can be found on the HP website.
You'll find GNV on the OpenSource pages of OpenVMS: http://h71000.www7.hp.com/opensource/opensource.html. Current version here is 1.6-2.

And you'll like this: IT'S FREE

Willem
Willem Grooters
OpenVMS Developer & System Manager
Martin P.J. Zinser
Honored Contributor

Re: VMS commands similar to Unix commands

Hello,

pretty much all of your questions were
covered already.

Two small additions:

> ls -lt |grep " "

pipe dir | search sys$pipe: " "

OTOH since you can give filespecs with pretty
complicated wildcards directly to dir you rarely will need to use this.

Cron: Ususally time-scheduled jobs are done on VMS from within the executing DCL itself.
If you do really look for a "Cron" check out

http://zinser.no-ip.info/vms/sw/kronos.htmlx

(The link to the NASA site is broken, but you can get local copies of the sources.)

Greetings, Martin
Ian Miller.
Honored Contributor

Re: VMS commands similar to Unix commands

GNV is not only free, its open source See http://gnv.sourceforge.net/ and its being actively worked on.
____________________
Purely Personal Opinion