Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Microsoft Network Client Version 2.2: User's Guide for MS-DOS Clients > Chapter 7 Basic Reference

Using UNIX System Commands

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

The following list describes LAN Manager Basic commands you can use to work with a LAN Manager for UNIX Systems server:

To

Use this command

Change a user's permissions for a directory or file

uchmod*

Convert a UNIX system text file to MS-DOS

ud*

List files or directories and display UNIX system access permissions

udir*

Rename or move a file using the UNIX operating system

uren*

Run a program or command on a LAN Manager server

netrun*

These commands are only available when you have a LAN Manager for UNIX Systems server on your network.

Addname

Purpose

The addname utility lets users of Microsoft TCP/IP access resources of a server on a different TCP/IP network, using a network gateway.

Syntax

addname computername ipaddress

addname computername /delete

addname /load | /save [filename]

where

computername

Is the name of the remote server whose entry you want to add or delete. Computernames can have as many as 15 characters. These computernames do not affect the assignment of any local computername or username.

ipaddress

Is the IP address that corresponds to computername. If the computername is stored in the LMHOSTS file, the new IP address temporarily replaces the existing IP address.

/delete

Deletes the specified computername from the workstation's list of current entries but not from the LMHOSTS file.

/load

Loads a set of entries from the specified file. All current entries are deleted, and all entries in the specified file are added. If there is not enough room for all new entries in the file, an error is reported, and no changes are made to the list of current entries. If you don't specify a filename, the default LMHOSTS file is used.

/save

Stores the list of current entries in the specified file. All entries in the file are overwritten by the current entries. If you don't specify a filename, the default LMHOSTS file is used. To delete an entry from the default addname configuration file, use addname /save after deleting the entry.

filename

Specifies the name of the file to load or save.

When you type addname with no options, the list of current addname entries is displayed.

Comments

When your computer is configured as a LAN Manager workstation using Microsoft TCP/IP, you can use the addname utility to access the resources of a server that are on another TCP/IP network accessible through a network gateway. The addname utility matches remote LAN Manager servernames to their IP addresses.

The addname utility temporarily adds entries to your workstation's memory. These entries are deleted when you unload Microsoft TCP/IP from memory or when you restart your computer. To save the entries in the LMHOSTS file, use the /save option.

The addname utility can be used only when the Microsoft TCP/IP software and the NetBIOS network software are loaded into your workstation's memory. You can add as many as four entries using addname.

Examples

  • To temporarily add the server FLAMINGO, whose IP address is 15.6.127.8, type:

    addname flamingo 15.6.127.8
  • To see the list of current entries, type:

    addname
  • To save the list of current entries in the LMHOSTS file, type:

    addname /save
  • To delete the server FLAMINGO from the LMHOSTS file, type:

    addname flamingo /delete

  • To load new entries from the file A:\uSER\MYHOSTS, type:

    addname /load a:\user\myhosts

    This command deletes all existing LMHOSTS entries before adding all entries from A:\uSER\MYHOSTS. If there are more than 63 entries in A:\uSER\MYHOSTS, an error occurs, and no changes are made to the list of current entries.

Clipcach

Purpose

The clipcach command enables an MS-DOS workstation to receive network print jobs from a server and to print these jobs on a shared printer physically connected to the workstation, using the LaserTools PrintCache software. This command is only available when you have a LAN Manager for UNIX Systems server on your network.

Syntax

clipcach /i /s:driveid [any | \\servername] [ /d | /e]

clipcach [any | \\servername] [/d | /e]

where

/i

Loads clipcach into memory. To load clipcach, use this option only after you boot the workstation.

/s:driveid

Specifies the drive ID that clipcach will use to link to its spool directory on the server. Replace driveid with the drive ID that clipcach is to use. To load clipcach, use this option only after you boot the workstation. Do not add the colon after the drive ID, for example, enter only N for driveid.

any

Allows clipcach to accept print requests from any server. Unless you specify otherwise, any is the default when you load clipcach.

servername

Represents the name of the server from which clipcach will accept print requests. Replace servername with the name of the server from which clipach will accept print requests.

/d

Temporarily disables clipcach. Network print jobs will be submitted to the queue but will not print while clipcach is disabled. The printer can continue to be used locally, however.

/e

Re-enables clipcach. Network print jobs will now be printed.

Comments

Clipcach is an MS-DOS terminate-and-stay-resident (TSR) program that runs on the workstation to which a shared printer is connected. Clipcach requires that the LaserTools PrintCache software be installed and loaded on the workstation to which the printer is connected. To receive print jobs from a server, clipcach automatically links to a shared spool directory on the server.

Placing PrintCache in raw or cooked mode is accomplished by using command-line switches to the PrintCache print command. In raw mode, tabs are not expanded and ^Z is not interpreted as the end of the file. In most cases, raw mode is acceptable for printing text files. Graphics files will not print while PrintCache is in cooked mode. Cooked mode may be required occasionally to print text files containing tabs if neither the printer nor the application generating the print job expands tabs. See the LaserTools PrintCache manual for more information.

Examples

  • To start the Clipcach program automatically and use the N: drive, add the following line to your AUTOEXEC.BAT file:

    clipcach /i /s:N

  • A shared printer is attached to your workstation and you want to use it locally. To do this you disable clipcach by typing:

    clipcach /d

    With clipcach disabled, you can use your printer locally. Network print jobs will be submitted to the queue on the server but will only be printed while clipcach is enabled.

  • When you are done using the printer locally, and want it to be used over the network, you enable clipcach by typing:

    clipcach /e

    Network print jobs will now be printed.

  • The shared printer attached to your workstation accepts print jobs from all the servers on your local area network. One of your coworkers needs to print out several files as soon as possible. Your co-worker will be sending these print requests from the server PRINT1.SERVE. To make sure that his or her files are printed in a timely manner, you allow the shared printer to accept requests from the PRINT1.SERVE server only by typing:

    clipcach \\print1.serve

  • Once the files have printed, you once again allow the shared printer to accept print requests from all of the servers on the local area network by typing:

    clipcach any

See Also

For information about

See

Using clipcach

Chapter 6, "Using LAN Manager Basic"

Other print spoolers

Clispool; Printsta

Clispool

Purpose

The clispool command enables an MS-DOS workstation to receive network print jobs from a server and to print these jobs on a shared printer physically connected to the workstation, using the MS-DOS print command. This command is only available when you have a LAN Manager for UNIX Systems server on your network.

Syntax

clispool /i /s:driveid [any | \\servername] [/r | /c] [/d | /e]

where

/i

Loads clispool into memory. To load clispool, use this option only after you boot the workstation.

/s:driveid

Specifies the drive ID that clispool will use to link to its spool directory on the server. Replace driveid with the drive ID that clispool is to use. To load clispool, use this option only after you boot the workstation. Do not add a colon after the drive ID, for example, enter only N for driveid.

any

Allows clispool to accept print requests from any server. Unless you specify otherwise, any is the default when you load clispool.

servername

Represents the name of the server from which clispool will accept print requests. Replace servername with the name of the server from which clispool will accept print requests.

/r

Places the MS-DOS print command into raw mode, which permits the printing of graphics files. In raw mode, tabs are not expanded and ^Z is not interpreted as the end of the file. In most cases, raw mode also is acceptable for printing text files, since tabs in text files are usually expanded by the printer or the application generating the print job. Unless you specify otherwise, raw mode is the default whenever you load clispool.

/c

Places the MS-DOS print command into cooked mode. In cooked mode, tabs are expanded, and ^Z is interpreted as the end of the file. Graphics files will not print while print is in cooked mode. Cooked mode may be required occasionally to print text files containing tabs if neither the printer nor the application generating the print job expands tabs.

/d

Temporarily disables clispool. Network print jobs will be submitted to the queue but will not print while clispool is disabled. The printer can continue to be used locally, however.

/e

Re-enables clispool. Network print jobs will now be printed.

Comments

To access the clispool command, first link to the appropriate shared directory. This command is stored in the DOSUTIL shared directory on a LAN Manager for UNIX Systems server. To perform this command, you must first link to this shared directory as in the following example:

net use d: \\server1.serve\dosutil

Clispool is a MS-DOS terminate-and-stay-resident (TSR) program that runs on the workstation to which a shared printer is connected. Clispool requires that the MS-DOS print command be installed and loaded on the workstation to which the printer is connected. To receive print jobs from a server, clispool automatically links to a shared spool directory on the server.

Examples

  • To start the clispool program automatically and use the N: drive, add the following line to your AUTOEXEC.BAT file:

    clispool /i /s:N

  • A shared printer is attached to your workstation and you want to use it locally. To do this you disable clispool by typing:

    clispool /d

    With clispool disabled, you can use your printer locally. Network print jobs will be submitted to the printer's queue but will only be printed while clispool is enabled.

  • When you are done using the printer locally and want it to be used over the network, you enable clispool by typing:

    clispool /e

    Network print jobs will now be printed.

  • The shared printer attached to your workstation accepts print jobs from all the servers on your local area network. For example, one of your coworkers needs to print out several files as soon as possible. Your coworker will be sending these print requests from the server PRINT1.SERVE. To make sure that his files are printed in a timely manner, you allow the shared printer to accept requests from the PRINT1.SERVE server only by typing:

    clispool \\print1.serve

  • Once the files have printed, you once again allow the shared printer to accept print requests from all of the servers on the local area network by typing:

    clispool any

See Also

For information about

See

Using clispool

Chapter 6, "Using LAN Manager Basic"

Other print spoolers

Clipcach; Printsta

Kermit

Purpose

The kermit command enables an MS-DOS workstation to emulate a terminal in order to log on to a UNIX system host computer, upload and download files with a host that is also running Kermit, or exchange files with another workstation running the Kermit terminal emulator. This command is only available when you have a LAN Manager for UNIX Systems server on your network.

Syntax

kermit [command, ... ]

where

command

Is any valid Kermit command.

Comments

To access the kermit command, first link to the appropriate shared directory. This command is stored in the DOSUTIL shared directory on a LAN Manager for UNIX Systems server. To perform this command, you must first link to this shared directory as in the following example:

net use d: \\server1.serve\dosutil

The kermit command is a full-featured terminal emulator and file transfer utility.

For more information on Kermit, see Appendix C, "Connecting to a LAN Manager for UNIX Systems Server." For a complete description of all the options and features, see your Kermit documentation.

The functions provided by Kermit allow you to:

  • Create and use Kermit command scripts to automatically log on and transfer files.

  • Redefine the keyboard so that any key can send any character or string while you communicate with a host computer.

  • Define Kermit command macros.

  • Start Kermit and execute Kermit commands from a batch file.

  • Transfer files between two workstations running Kermit, and execute certain MS-DOS commands remotely between the workstations.

  • Use Kermit over the local area network or over a serial port.

  • Change the type of terminal Kermit emulates and set terminal attributes.

  • Use your printer from Kermit.

  • Customize the colors in the Kermit screen.

Source code for Kermit on many different computers and operating systems is available from Columbia University, which holds the copyright to the file transfer protocol and to many Kermit implementations.

Load

Purpose

The load utility loads the specified protocol on workstations using Demand Protocol Architecture (DPA).

Syntax

load protocol [/i]

where

protocol

Is the name of the protocol to be loaded. Information regarding protocols is placed in the PROTOCOL.INI file and in LANMAN.DOS\DRIVERS\PROTOCOL by the installation program. You should not edit these files yourself.

/i

Displays a list of loaded protocols and the order in which they were bound.

Comments

By default, the network (and protocol) is specified in the AUTOEXEC.BAT file. The load utility allows you to load protocols as you need them.

Do not use the load utility while running the Microsoft Windows operating system. Either load the protocol before running the Windows operating system, or stop the Windows operating system, load the protocol, and then restart the Windows operating system.

You may need to load a secondary protocol to access certain network resources. If you were using such a resource when you logged out, and the required protocol is not automatically loaded when you log on again, and you are using the persistent connections feature, you will receive a message that the resource is unavailable. You will be able to reconnect to the resource after you load the required protocol.

NOTE: In order to use the Demand Protocol Architecture (DPA) to load protocols, the line dynamic = yes must be included in the [protman] section of the PROTOCOL.INI file.

Also, in the CONFIG.SYS file, the line specifying the protocols to be used must come before the line that begins device = and contains \protman.dos.

See Also

For information about

See

Unloading a protocol

Unload

Demand Protocol Architecture (DPA)

Installation Guide for Clients

Net Continue

Purpose

The net continue command reactivates network connections suspended with the net pause command.

Syntax

net continue {drdr | prdr}

where

drdr

Continues a workstation's connections to all shared directories.

prdr

Continues a workstation's connections to all shared printer queues.

Comments

You can abbreviate the net continue command as net cont.

When you continue network connections using net continue, your workstation ignores its local connections to corresponding printers and drives when a network connection is assigned to the same port.

See Also

For information about

See

Pausing and continuing network connections

Chapter 6, "Using LAN Manager Basic"

Suspending connections to shared resources

Net Pause

Connecting to shared resources

Net Use

Net Help

Purpose

The net help command provides Help with a specific command and lists commands for which Help is available.

Syntax

net help [command]

net [command] help

where

command

Is the command you need help with. Supported command names are net continue, net name, net pause, net print, net start, and net use. You can just type the action name, leaving off net. For example, for Help with the net print command, type net help print.

To display information about how to get Help, type net help.

Comments

For Help with a specific command, type net, the command name, and help, or type net help followed by the command name. (Do not repeat the word net as part of the command name.)

Examples

  • To view a list of LAN Manager Basic commands that you can get Help with, type:

    net help

  • To get information about the net use command, type:

    net help use

    - Or -

    net use help

See Also

For information about

See

Getting Help

Chapter 6, "Using LAN Manager Basic"

Net Name

Purpose

The net name command displays the computername assigned to a workstation and assigns a computername to a workstation.

Syntax

net name [\\computername]

where

computername

Is the name assigned to a workstation or the name you want to assign to a workstation.

To display a workstation's computername, type net name.

Comments

The computername identifies a workstation on the network and is a key for performing network tasks. When you connect your workstation to a shared resource, the server sharing the resource checks the computername to verify that you are allowed access. For this reason, a computername must be unique on the network.

If you need to access shared resources that require a password, your computername must be the same as your username.

You assign a computername when you start your workstation with the net start workstation command unless you try to assign a name that is already in use. In this case, the workstation starts without an assigned computername. If this occurs, use net name to assign a valid computername.

If no computername displays when you type net name without options, the workstation started without a valid computername.

See Also

For information about

See

Computernames

Chapter 6, "Using LAN Manager Basic"

Setting computernames

Net Start Workstation

Net Pause

Purpose

The net pause command pauses connections to shared resources.

Syntax

net pause {drdr | prdr}

where

drdr

Pauses a workstation's connections to all shared directories.

prdr

Pauses a workstation's connections to all shared printer queues.

Comments

Pausing a connection allows you to temporarily use a devicename for a device at your workstation that is already assigned to a shared resource.

For example, you can connect the LPT1 devicename to a shared printer queue. If LPT1 is also assigned to a printer attached to your workstation, you can pause the network connection and print a file at your workstation's printer. To send print jobs again to the shared printer queue with the devicename LPT1, reactivate the connection with the net continue command.

See Also

For information about

See

Pausing and continuing network connections

Chapter 6, "Using LAN Manager Basic"

Continuing connections to shared resources

Net Continue

Connecting to shared resources

Net Use

Net Print

Purpose

The net print command displays the contents of shared printer queues and prints a file.

Syntax

net print {\\computername[\sharename] | devicename}

net print [filename] devicename

where

computername

Is the name of the server sharing the printer queue(s) with contents you want to display.

sharename

Is the name of a printer queue with contents you want to display.

devicename

Is the name of the device at your workstation you assign to the printer queue with contents you want to display. LPT1 through LPT3 are the devicenames available for printer queues.

filename

Is the name of a file you want to print.

Comments

Specifying the computername of a server with the net print command displays the contents of its printer queues. You don't need to be connected to a server to view the contents of its printer queues.

Specifying the devicename you assigned to a printer queue with the net print command displays the contents of that printer queue, allowing you to check the status of a print job you sent.

Specifying either a computername or a devicename produces a display similar to the following:

Pos   ID       Size      Date     Time   Name   Status
—————————————————————————————————————————————————————————
001 268 115074 07-15-92 16:20 DANC Printing
002 269 65174 07-15-92 16:22 JOHNSW Waiting

This display shows the position, identification number, size (in bytes), date, time, owner, and status of each print job in the printer queue.

The Name column lists the owner of each print job. When a job was sent from a LAN Manager Basic workstation, this column shows the computername. When a job was sent from a LAN Manager Enhanced or an OS/2 workstation, this column shows the username.

Examples

  • To examine the contents of printer queues on the \\FINANCE server, type:

    net print \\finance

  • To send the REPORTS.DOC file to the printer queue connected to your workstation's LPT1 devicename, type:

    net print reports.doc lpt1:

  • To check the status of a print job that you sent to the printer queue connected to LPT1, type:

    net print lpt1:

See Also

For information about

See

Printing over the network

Chapter 6, "Using LAN Manager Basic"

Connecting to shared printer queues

Net Use

Net Start Workstation

Purpose

The net start workstation command starts a workstation and sets its computername.

Syntax

net start workstation computername

where

computername

Is the name assigned to a workstation.

Comments

You can abbreviate workstation as wksta, redirector, or rdr.

When you type net start workstation computername, LAN Manager Basic software loads into your workstation's memory and the workstation starts.

You will rarely, if ever, use this command. Usually, your administrator will set up your workstation so that the net start workstation command is in your AUTOEXEC.BAT file and LAN Manager Basic starts automatically.

See Also

For information about

See

Computernames

Chapter 6, "Using LAN Manager Basic"

Checking the computername

Net Name

Net Use

Purpose

The net use command connects a workstation to or disconnects a workstation from a shared resource, or displays information about workstation connections. It also controls the persistent net connections feature.

Syntax

net use [devicename] [\\computername\sharename [password | *]

net use {devicename | \\computername\sharename}/delete

net use [devicename] [\\computername\sharename [password | *]

net use /p[ersistent]:{yes | no | freeze | save}

where

devicename

Assigns a name to a device connected to a shared resource or specifies the disconnecting devicename. LAN Manager Enhanced uses two kinds of devicenames, one type for disk drives (all nonlocal drive letters through the value of LAST DRIVE as defined in the CONFIG.SYS file) and the other type for printers (LPT1 through LPT3).

computername

Is the name of a server sharing a resource. If the computername contains blank characters, enclose the double backslash (\\) and the computername in quotation marks (" ").

sharename

Is the name of a resource.

password

Is the password needed to use a resource. To be prompted for the password, type an asterisk (*) instead of the password. A password does not appear when you type it at a password prompt.

/delete

Cancels a network connection.

/p[ersistent]

Controls the use of persistent network connections. This switch is used alone; it cannot be combined with any other switch, nor can it be used while adding or removing a connection. The default is yes.

yes

Saves all connections as they are made and restores them at next logon.

no

Neither saves nor restores connections at the next logon.

freeze

Stops saving connections but does not overwrite the existing list of connec tions.

save

Saves your current connections, over writing any previously saved connec tions. These settings will be restored each time you log on. Connections made after using the net use /o: save command are neither save nor restored.

To list a workstation's connections, type net use without options.

Comments

By connecting a workstation to a shared resource, you can use the resource as if it were attached to the workstation.

For example, net use can connect your workstation to a shared printer queue that uses a high-quality printer. When you use a program such as Microsoft Excel spreadsheet, you can print files on that printer by directing print jobs to the devicename for the queue that uses the printer.

You can use a shared resource without making a connection with net use. The connection is made automatically by MS-DOS and some network programs when you specify the network path of the resource with a command. If the resource is protected by a password, you must establish access with net use. You don't have to assign a devicename to establish access. Just type net use, the network path of the resource, and the password.

You can use a shared directory without assigning a devicename to the connection. You do this at the MS-DOS prompt by using the network path with some commands and applications.

For example, to use Microsoft Word to edit the LIST.DOC file in the shared directory with the network path \\SALES\FARWEST, type:

word \\sales\farwest\list.doc

Microsoft Word loads the shared file even though you haven't made a previous connection to \\SALES\FARWEST. Note that this procedure doesn't work when you need a password to gain access to \\SALES\FARWEST. In this case, you must first establish access to the directory.

You cannot delete a connection to a shared directory if you use that directory as your current drive. You must change to another drive before you delete the connection.

NOTE: You can only make connections to sharenames of up to eight characters, optionally followed by an extension consisting of a period (.) and one to three characters. LAN Manager sends an error message if you try to connect to a longer sharename.

Viewing Your Workstation's Connections

When you type net use without options, you get information about your workstation's connections in a display similar to the following:

Status          Local name    Remote name
—————————————————————————————————————————————————
OK M: \\FINANCE\SCRATCH
DISCONNECTED G: \\PRODUCT\C
ERROR LPT1: \\PRINT1\LASER

The status of a connection can be:

OK

Active

Disconnected

Suspended by the server but will re-establish when you use it

Paused

Paused by the workstation

Error

Ended and must be deleted

Local name is the devicename assigned to the resource. Remote name is its network path.

There are two ways to get information about a connection:

  • Type net use devicename.

  • Type net use and the network path of the resource. You must type this command twice: first to establish a connection to the resource, and then to get information about it.

Either method produces a display similar to the following:

Local name            LPT1:
Remote name \\PRINT1\LASER
Resource type Print
Status OK
#Opens 0
#Connections 1

Resource type

Is the type of resource you are using (disk or printer).

#Opens

Is the number of files currently open in this connection.

#Connections

Is the number of connections the workstation has to the resource.

Examples

  • To assign the devicename E: to the LETTERS directory on the \\FINANCE server, type:

    net use e: \\finance\letters

  • To assign the devicename LPT1 to the LASER2 printer queue on the \\ACCOUNT server, type:

    net use lpt1: \\account\laser2

  • To cancel your connection to the \\ACCOUNT\LASER2 printer queue connected to LPT1, type:

    net use lpt1: /delete

  • To establish access to the \\FINANCE server's SCRATCH shared directory, which requires the password meteor, type:

    net use \\finance\scratch meteor

  • To cancel your connection to the \\FINANCE\SCRATCH shared directory, type:

    net use \\finance\scratch /delete

  • To connect to a resource shared on the FINANCE 2 server, type:

    net use k: "\\finance 2"\memos

    You must use quotation marks with a servername that has a space. If you omit the quotation marks, LAN Manager will not accept a servername that includes a space.

See Also

For information about

See

Making connections

Chapter 6, "Using LAN Manager Basic"

Pausing and continuing connections

Net Pause, Net Continue

Viewing connections

Net View

Netrun

Purpose

The netrun command runs a program or command on a LAN Manager OS/ 2 or UNIX system server.

NOTE: Netrun does not work on Windows NT Advanced Servers or workstations. You cannot use the netrun command to run interactive programs such as word processors or spreadsheets.

Syntax

netrun command

where

command

Is the name of a program you want to run. The program file must have a .EXE extension. You don't need to supply the filename extension when you type the command.

Comments

The netrun command lets you use another computer's processing power to run a program. You may need the help of your administrator to use this command.

To run a program on a server

  1. Get the filename of the program you want to run and the computername of the server you want to use.

  2. Connect to a shared directory on the server with the net use command.

  3. Change your current directory to the shared directory. This directory need not contain the program you want to run; the administrator defines which programs you can run.

  4. Type netrun followed by the filename of the program and any options or vari ables the program requires.

If the program you are running has options or variables that include filenames, specify the full path for each file. If a drive letter is included in the path, LAN Manager assumes that the drive is one of the server's drives.

Most programs produce some kind of output or data. When you use netrun, this output is sent to your screen. To send the output to a file, specify a >path to receive the output in the netrun command line. By default, LAN Manager creates this file in the current directory. If you specify a drive letter, netrun assumes the drive is one of the workstation's drives.

Because the Netrun service runs as a daemon process on the UNIX system server without a controlling terminal, and because any command executed by netrun inherits this state, those programs that issue input prompts when they detect that they are being run from the command line will not issue prompts.

Commands that can be run with the netrun command are controlled by the Netrun service on the computer that has the executable file. For example, the shell detects whether there is a controlling terminal and issues the PS1 prompt while waiting for command input. It does not do this when input is not coming from a terminal (for example, when it is running a shell script from a file). When run from netrun, the shell will not issue any prompts. A sample session follows:

D:> netrun sh 
date
Wed Sep 2 17:20:26 PDT 1992
who
root console Aug 24 12:31
exit
D:>

When using the netrun program on an MS-DOS client, the keyboard input is buffered, and lines are sent only when the buffer fills or a return is entered. This may require entering a return after some special characters to get them sent across. For example, when entering expressions to the UNIX system bc program, you might type the following:

D:> netrun bc 3+4 7

If you then intend to exit bc by typing CTRL+D (which would normally terminate bc immediately), you need to follow the CTRL+D with a carriage return to send the CTRL+D to the server.

Example

  • Suppose you want to run a file-comparison program called DIFF.EXE on the \\ADMIN server with the LISTS shared directory. The two files you want to compare are MAILLIST.TXT and ADDRESS.LST, and the file you want to receive the output is NEWLIST.TXT on your drive C.

    To accomplish this comparison, assign a devicename (such as D:) to the LISTS directory on the \\ADMIN server. Change to that drive, and start the program using the netrun command. To do this, type the following:

    net use d: \\admin\lists
    d:
    netrun diff maillist.txt address.lst >c:\newlist.txt

See Also

For information about

See

Connecting to a shared directory

Net Use

Viewing a list of shared directories on a server

Net View

Other UNIX system commands

Uchmod, Ud, Udir, Uren

Nwload

Purpose

The nwload utility starts NetWare Connectivity.

Syntax

nwload [username]

where

username

Is your NetWare username.

Comments

NetWare Connectivity allows you to use Novell NetWare servers. You will be prompted for your NetWare username, unless you include it on the command line.

You cannot use this utility while the Microsoft Windows operating system is running. Use this utility before you start the Windows operating system; or stop the Windows operating system, use the nwload utility, and then restart the Windows operating system.

See Also

For information about

See

Unloading NetWare Connectivity

Nwunload

NetWare Connectivity

Appendix B, "Using NetWare Connectivity," and the NetWare Connectivity Guide

Nwunload

Purpose

The nwunload utility unloads NetWare Connectivity.

Syntax

nwunload

Comments

NetWare Connectivity allows you to use NetWare servers. After you unload NetWare Connectivity with the nwunload utility, you can start NetWare again with the nwload utility.

You cannot use this utility while the Microsoft Windows operating system is running. Use this utility before you start the Windows operating system; or stop the Windows operating system, use the nwunload utility, and then restart the Windows operating system.

See Also

For information about

See

Loading NetWare Connectivity

Nwload

NetWare Connectivity

Appendix B, "Using NetWare Connectivity," and the NetWare Connectivity Guide

Ping

Purpose

The ping utility lets you verify a physical connection to a remote computer.

Syntax

ping remote_computer [-t [timeout_value]] [-n [num_times]]

where

remote_computer

Is the computername or IP address of a remote computer.

-t [timeout_value]

Is the number of seconds (timeout_value) that this node waits for an ICMP echo reply from a remote computer. The timeout_value range is from 1 through 300 seconds; the default is 20.

-n [num_times]

Is the number of times ping sends an echo request to the remote computer. If you don't specify a number, ping uses the default of one echo request.

NOTE: There is a 1-second delay between each echo request.

Comments

The ping utility is a Microsoft TCP/IP utility that can be used to isolate network hardware problems and incompatible configurations for StarLAN 10 networks, token-ring networks, and ThinLAN networks.

Printsta

Purpose

The printsta command accepts print jobs from other workstations and prints them on a shared printer.

Syntax

printsta options

printsta /D

where options are:

/N:name

Allows you to grant one remote workstation exclusive access to the LAN Manager Print Station printer. If you use this switch, the only remote user who can send print jobs to your printer is the one at the computer with computername name. (Of course, you will still be able to send print jobs to your own printer, too.)

/L:n

Tells LAN Manager Print Station which printer port to use. For example, /L:1 would instruct LAN Manger Print Station to use printer connected to LPT1.

The range is 1 to 3; the default is 1.

/V:n

Redirects printer output from the workstation that is sharing a printer from the port that has the shared printer to the specified logical port, which may be in turn redirected to a queue on a server. You may specify 1 for LPT1, 2 for LPT2, or 3 for LPT3.

/Q

Acts as a toggle to pause and release the queue.

/M:n

Specifies the amount of cache memory reserved for each permitted spool file.

When LAN Manager Print Station is loaded, it allocates a memory block (a buffer) for caching the spool file data for each spool file that it may receive over the network. You set the number of spool files that may be created at one time with the /F option. For example, if you set /F:10 and /M:200, when LAN Manager Print Station loads, it will allocate 2000 bytes for the buffers that receive data that go into the spool files. In this case, when a print job arrives, LAN Manager Print Station will collect data until it has received 200 bytes; then it will write that data into the spool file, empty the buffer, and receive the next 200 bytes of data from that print job. At any one time, it may be doing this for each of the 10 spool files permitted.

Increasing the size of these buffers reduces the amount of network traffic needed to print a file but also increases the amount of memory the LAN Manager Print Station needs. These buffers are allocated from MS-DOS and do not reside in the same place in memory as the print spooler. The size of these buffers should be reduced if memory constraints are a problem. The range is 128 bytes to 4096 bytes; the default is 128 bytes.

/T:n

Sets the priority of LAN Manager Print Station on the host computer. That is, it establishes how successfully LAN Manager Print Station can compete for processing time with other programs that the user of the host computer may be running, by controlling how often it can use the computer's processing power. The highest priority is 1. Assigning a lower priority (by increasing this value) will force LAN Manager Print Station to wait longer periods of time in between doing any processing. If using LAN Manager Print Station seems to slow the use of other applications on the workstation, increase this value. If fast print spooling is more important, then assign a higher priority (decrease the value) to give LAN Manager Print Station more processing time. For example, the default value of 10 instructs LAN Manager Print Station to process approximately twice every second.

The range is 1 to 255, with 1 being the highest priority. The default is 10.

/I:n

Each time the printsta utility gains control of the computer's processing power, it will use n cycles for processing before it relinquishes control again. The range is 1 to 255, the default is 1.

/O:n

Specifies the number of characters to be printed in each pass. The range is 1 to n characters, where n is the value specified with the /M switch. The default is 32.

/A:n

Causes LAN Manager Print Station to disconnect remote clients that have not spooled to the printer in the number of minutes specified.

The range is 0 (never auto-disconnect) to 1440 minutes; the default is 1 minute.

/R:n

If LAN Manager is loaded in spooling mode, this option (retry) specifies the number of seconds to wait between printer status checks. If the printer is slow, this value should be increased.

If LAN Manager Print Station is loaded in nonspooling mode, this option (retry) instructs the spooler to wait for the specified number of seconds before failing the print request. Since the nonspooling mode does not maintain a queue, print jobs that run into a printer error are held until either the error clears or the retry time (n seconds) passes. After n seconds, the print job will fail. After the printer error is determined and corrected, the remote user can send the print job again. It is recommended that /R be set to a small value for the nonspooling mode, since the remote user's computer cannot continue any processing until it receives a response to its network print request.

The range is 1 to 255 seconds; the default is 5.

/B:n

Configures the maximum number of network buffers that LAN Manager Print Station allocates when it is loaded into memory. Network buffers are used to build network packets for sending data across the network. Each network buffer uses 128 bytes of memory. When there are more network buffers, more information can be sent in each packet, and spool files encounter less competition for the buffer. This can dramatically affect network performance, so low numbers of network buffers should be avoided.

The range is 1 to 20 buffers; the default is 5.

/C:n

Specifies the maximum number of remote sessions that can be active at once, that is, the number of net use connections users can establish with the host workstation to use LAN Manager Print Station. Each session takes only 24 bytes of memory.

The range is 1 to 20 sessions; the default is 5.

/E

Enables the host workstation to send messages from the printer to the remote user who has sent the print job.

The default is for the host workstation not to send these messages.

/F:n

Specifies the maximum number of spool files that can be open on the host workstation at once. There is no constraint on how many of these spool files a single remote session can have open.

Spool file structures are allocated when LAN Manager Print Station is loaded and take up 64 bytes of memory each. Since one cache block is allocated per spool file, the total memory used for each spool file is actually 64 bytes + the size of the cache block. The size of the cache block is set with the /M option.

If possible there should be at least one network buffer allocated for every spool file. Network buffers are set with the /B option.

The range for /F is 1 to 10 spool files; the default is 5. To load LAN Manager Print Station in nonspooling mode, set /F:0 (spool files equal to zero).

/K:jobid

Deletes the print job specified by jobid. To obtain the jobid number, either view the queue through Print Manager (if you are using the Windows operating system) or use the command:

net print \\hostcomputername\lpt

The jobid will appear on the line for the print job you want to delete.

/P:password

Protects the printer share with a password. Only users who know the password will be able to connect to the workstation to use LAN Manager Print Station.

The password may be up to 15 characters long.

/S

Enables separator pages. One extra page, with the remote user's name, will be printed per print job.

/W:directory

Specifies the working directory where LAN Manager Print Station will keep its spool files. If no option is specified, the directory that was current when LAN Manager Print Station was loaded will be used. By specifying a working directory, you can prevent the user at the host workstation from being distracted or annoyed by the appearance of temporary files in a directory that is reserved for other work.

Generally, you should not delete spool files from the working directory, as doing so could disrupt a remote print job. All spool files are deleted at the end of the print job.

This option does not affect LAN Manager Print Station in the nonspooling mode.

/D

Removes LAN Manager Print Station from memory. This option cannot be used with any other options.

This will free all memory reserved for caching spool files, as well as freeing the memory used for the program itself. It will cancel any jobs that have not com pleted and will remove the computername from the network's list of available servers. You can restart LAN Manager Print Station any time after you have suc cessfully removed the program from memory.

In some instances, other applications may hook the interrupts that LAN Manager Print Station chained when the program was started. If this hap pens, the printsta /D command will be unable to unhook those interrupts, and will continue to use a small amount of memory to handle them. In this case, you will not be able to restart LAN Manager Print Station until you have rebooted your computer.

Comments

The workstation running LAN Manager Print Station must be running MS-DOS version 3.3 or later and LAN Manager 2.1a or later.

LAN Manager Print Station uses only conventional memory. The default configuration uses just over 6K of memory. If you allow more than the default number of spooled files, network buffers, and/or remote connections, or if you increase the cache size, the memory requirements can be as much as 51.4K. If you use the minimal configuration with the spooler enabled, you can reduce the memory requirements to 5.4K. For low-memory configurations, you can disable the spooler, lowering the memory requirements to 5.0K. If disk space is not available for temporary files, it is a good idea to disable the spooler. However, if the spooler is disabled, users who send print jobs to this printer will be unable to use their workstations until their print job is done.

LAN Manager Print Station can only be reached via the first protocol on the workstation sharing the printer. Usually, this is the first protocol listed in that workstation's PROTOCOL.INI file. However, the order of protocols can be changed with the wrknets keyword in the [workstation] section of the LANMAN.INI file. The protocol need not be the first protocol on the remote workstation that is sending the job. For example, if NetBEUI is the first protocol on the workstation sharing the printer, workstations sending jobs must use NetBEUI as one of their protocols.

The workstation sending a print job must establish a network connection to the LAN Manager Print Station host workstation. MS-DOS workstations must be running LAN Manager 2.0 or later; OS/2 workstations must be running LAN Manager 2.1a or later.

Loading LAN Manager Print Station on the Hoappears.st Workstation

To allow other users to send print jobs to your printer, you must load LAN Manager Print Station as a terminate-and-stay-resident (TSR) program, using the printsta command. If necessary, you can also unload the program. LAN Manager Print Station must be loaded prior to the Windows operating system. If you are using the AUTOEXEC.BAT file to load Print Station and to start the Windows operating system, be sure the line to load Print Station comes before the line that starts the Windows operating system but after the line that starts the Workstation service.

To load LAN Manager Print Station

  • Type printsta [options], where options are those listed in this command reference.

To unload LAN Manager Print Station

  • Type printsta /d.

For details, see the description of the /D option.

To Use LAN Manager Print Station from a Remote Workstation

You can connect to a LAN Manager Print Station printer as you would to any other printer, using the computername as the servername and LPT as the sharename. For example, to connect to the printer on the workstation \\WILDWOOD, you would connect one of your logical LPT ports to \\WILDWOOD\LPT.

Examples

  • To start Print Station with spooling disabled, type:

    printsta /f:0

  • To start Print Station, giving remote print jobs minimal priority for processing time, type:

    printsta /t:255

  • To start Print Station, allowing up to five spool files and five buffers, with 500 bytes of cache memory per spool file (2.5K bytes of cache memory will be allocated), type:

    printsta /f:5 b:5 /m:500

See Also

For information about

See

Using printsta

Chapter 3, "Using Shared Printers"

Other print spoolers

Clispool, Clipcach

Prtsc

Purpose

The prtsc utility is a terminate-and-stay-resident (TSR) program used to flush the print spooler when an application has failed to send an end-of-job signal.

Syntax

prtsc

Comments

This loads the utility into memory. To flush the spooler, press CTRL+ALT+PRINT SCREEN.

The prtsc utility is used to explicitly flush the spooler. Most applications send a signal that is recognized by the spooler as an end-of-job signal.

Uchmod

Purpose

The uchmod command allows you to change the UNIX system access permissions of a LAN Manager for UNIX Systems file or directory. This command is only available when you have a LAN Manager for UNIX Systems server on your network.

Syntax

uchmod [who] {{+ | - | = } permission } pathname

uchmod user#group#other# pathname

where

who

Represents the UNIX system user classification for which access permissions are changed. Replace who with u (user), g (group), o (others), or a (all classifications). When the who option is not specified, all user classifications are changed.

+

Adds the specified access permissions to the specified file or directory.

-

Removes the specified access permissions from the specified file or directory.

=

Sets access permissions to the groups or access permissions specified in the permissions option.

permissions

Represents the access permissions you want to assign to or remove from the directory or file. Replace permissions with any or all of the following: r (read), w (write), x (execute), l (lockable), s (set ID for user or group), or t (hold text file in swap space).

pathname

Represents the name of the file or directory to be affected. You can use wildcard characters.

user#

Represents the access permission value for the owner of the file or directory. Replace user# with the sum of any combination of the following values: 4 (for read), 2 (for write), 1 (for execute).

group#

Represents the access permission value for the group. Replace group# with the sum of any combination of the following values: 4 (for read), 2 (for write), 1 (for execute).

other#

Represents the access permission value for other users. Replace other# with the sum of any combination of the following values: 4 (for read), 2 (for write), 1 (for execute).

Comments

To access the uchmod command, first link to the DOSUTIL shared directory on LAN Manager for UNIX Systems servers. For example, type:

net use d: \\server1.serve\dosutil

Examples

  • You want to change the group (g) and other (o) access permissions of the file example to read-only. The UNIX system access permissions, for example, are currently read, write, and execute for user, group, and other (rwxrwxrwx). Type:

    uchmod go-wx example

    This changes the access permissions to rwxr--r--.

  • You want to change the user (u) access permissions of the file two to read and execute. The UNIX system access permissions for two are currently read-only for user, group, and other (--x--x--x). Type:

    uchmod u+r two

    This changes the access permissions to r-x--x--x.

  • You want to change the other (o) access permissions of the file list to execute only. The UNIX system access permissions for list are currently read-only for user, group, and other (r--r--r--). Type:

    uchmod o=x list

    This changes the access permissions to r--r----x.

  • You want to change the access permissions of all user classifications for the file milton to read-only, using numbers instead of letters. The UNIX system access permissions for milton are currently 644 (rw-r--r--). Type:

    uchmod 444 milton

    This changes the access permissions to r--r--r--.

See Also

For information about

See

Using the uchmod command

Appendix C, "Connecting to a LAN Manager for UNIX Systems Server"

Other UNIX system commands

Ud, Udir, Uren

Executing UNIX system commands

Netrun

Ud

Purpose

The ud command converts a UNIX system text file to MS-DOS format, or an MS-DOS file to UNIX system format. This command is only available when you have a LAN Manager for UNIX Systems server on your network.

Syntax

ud [{-d | -u } -z ] file1 [file2]

where

-d

Converts the file to MS-DOS format. If the file is already in MS-DOS format, it is copied to the second file.

-u

Converts the file to UNIX system format. If the file is already in UNIX system format, it is copied to the second file.

-z

Prevents ^Z from being appended to the end of a file converted from UNIX system format to MS-DOS format, or ignores ^Z characters in a file being converted from MS-DOS format to UNIX system format.

file1

Represents the name of the file you want to convert. This file remains unchanged after the command is executed.

file2

Represents the name you want to assign to the converted version of the file.

Comments

To access the ud command, first link to the DOSUTIL shared directory on a LAN Manager for UNIX Systems server. For example, type:

net use d: \\server1.serve\dosutil

When entered without the -d or -u parameter, ud converts a MS-DOS file to UNIX system format or a UNIX system file to MS-DOS format. If you do not redirect the output to a second file, the file is converted, and its text is displayed on your screen. You can also use a pipe ( | ) to send a reformatted file to a program.

Examples

  • To convert a UNIX system file named text.unx to MS-DOS format, and place the output in a file named text.dos, type:

    ud -d text.unx text.dos

  • To convert a UNIX system file named unixtext to OS/2 format, then sort the file and place the output in a file named text.srt, type:

    ud -d unitext | sort > text.srt

See Also

For information about

See

Using the ud command

Appendix C, "Connecting to a LAN Manager for UNIX Systems Server"

Other UNIX system commands

Uchmod, Udir, Uren

Executing UNIX system commands

Netrun

Udir

Purpose

The udir command lists files and directories, including those not displayed by the MS-DOS dir command, and displays the UNIX system access permissions. This command is only available when you have a LAN Manager for UNIX Systems server on your network.

Syntax

udir [ -n | -t | -u | -r | -d ] [pathname]

where

-n

Lists file and directory names only.

-t

Lists the newest files first.

-u

Lists files on the server that are not available to the MS-DOS or OS/2 system.

-r

Displays the files in reverse alphabetical or chronological order.

-d

Displays the directory parameter only.

pathname

Represents the name of the directory and file to be listed. You can use a wildcard character with the filename.

Comments

To access the udir command, first link to the DOSUTIL shared directory on a LAN Manager for UNIX Systems server. For example, type:

net use d: \\server1.serve\dosutil

If a UNIX system filename contains characters that are invalid in MS-DOS or is longer than the MS-DOS limit, you can use udir to list the file. If the specified resource is on a server running the UNIX operating system, udir displays information in a format like that displayed by the UNIX system ls - l command. If the specified resource is on a computer running the MS-DOS or OS/2 operating system, udir displays information in a format like that displayed by the MS-DOS dir command.

NOTE: Filenaming conventions are based on the MS-DOS filenaming conventions (FAT).

Examples

  • You want to list the contents of the current directory on your local drive C. Type:

    udir

    The following appears:

    C:\udir 
    Volume in drive C: is DOS401
    Directory of C:\.
    autoexec.bat rw--a 145 6-08-92 10:05a
    config.sys rw--a 344 6-08-92 9:30a
    landoc rw--a <DIR> 8-10-92 7:30a
    dos3_2 rw--- <DIR> 6-10-92 11:08a
    ibmdos.com r-hsa 28009 9-12-92 3:45p
    report1.dft rw--a 8128 8-02-92 5:30p
    report2.dft rw--a 9012 8-16-92 9:30a
    res.scr rw--a 2045 8-08-92 8:30p
    tmp rw--a 23606 11-01-92
    9 Files 26.78 Megabytes free
  • You want to list the contents of the shared directory linked to drive ID F. Type:

    udir f:

    The following appears:

    C: udir f: 
    Status: RO
    Volume in drive F: is CARPET_SERV
    Directory of f:/*
    UNIX-based server 'CARPET.SERVE' in share area 'VACUUM'
    DOS Name Owner Group Modes
    UNIX Name
    . <DIR> 10-28-92 4:45p lanman DOS---- rwxrwxr-x .
    . . <DIR> 10-22-92 8:51a root root rwxrwxrwx ..
    65 10-28-92 4:39p root other rw-r--r-- name_too_long
    NET.DIR <DIR> 10-24-92 9:13a glenn DOS---- rwxrwxr-x net.dir
    OK_FOR.DOS 232 10-28-92 1:51p glenn DOS-a-- rw-rwlr-- ok_for.dos
    ROOTFILE 642950 10-25-92 2:19p root other rw-r--r-- rootfile
    6 Files 150.72 Megabytes free

See Also

For information about

See

Using the udir command

Appendix C, "Connecting to a LAN Manager for UNIX Systems Server"

Other UNIX system commands

Uchmod, Ud, Uren

Executing UNIX system commands

Netrun

Unload

Purpose

The unload utility unloads a specified protocol from a workstation with Demand Protocol Architecture (DPA).

Syntax

unload protocol

where

protocol

  • Is the name of the last protocol loaded. Information regarding protocols is placed in the PROTOCOL.INI file and in LANMAN.DOS\DRIVERS\PROTOCOL directory by the Setup program. You should not edit these files.

Comments

Protocols must be unloaded in the reverse of the order in which they were loaded (last in is first out). To get information on what protocols are loaded, and in what order, type:

load /i

Do not use the unload utility while running the Microsoft Windows operating system. Either unload the protocol before running the Windows operating system, or stop the Windows operating system, unload the protocol, and then restart the Windows operating system.

See Also

For information about

See

Loading a protocol

Load

Uren

Purpose

The uren command renames or moves files on a LAN Manager for UNIX Systems server running the UNIX operating system. This command is only available when you have a LAN Manager for UNIX Systems server on your network.

Syntax

uren oldfilename newfilename

uren filename1 [filename2... ] directoryname

where

oldfilename

Is the original filename.

newfilename

  • Is the new filename.

filename1

Is the name of the file you want to move.

filename2...

Is any additional files that you want to move.

directoryname

Is the name of the destination directory.

Comments

To access the uren command, first link to the DOSUTIL shared directory on a LAN Manager for UNIX Systems server. For example, type:

net use d: \\server1.serve\dosutil

You cannot use the uren command to move a file from one drive to another. In addition, you cannot use the wildcard character * with the uren command.

Examples

  • You want to rename TOOBIGFORDOS to OKFORDOS. Type

    uren toobigfordos okfordos

  • You want to move files ABC and DEF to the DIR1 directory. Type

    uren abc def dir1

See Also

For information about

See

Using the uren command

Appendix C, "Connecting to a LAN Manager for UNIX Systems Server"

Other UNIX system commands

Uchmod, Ud, Udir

Executing UNIX system commands

Netrun

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1996 Hewlett-Packard Development Company, L.P.