Some of the NetWare commands are:
| COMMAND | REMARKS |
| NDIR | To view contents of a directory |
| RENDIR | To rename a directory |
| NCOPY | To copy files |
| PURGE | To delete files permanently. PURGEd files cannot be Salvaged |
Some of the NetWare commands are:
| COMMAND | REMARKS |
| NDIR | To view contents of a directory |
| RENDIR | To rename a directory |
| NCOPY | To copy files |
| PURGE | To delete files permanently. PURGEd files cannot be Salvaged |
SALVAGE is not the only menu-driven utility offered by NetWare. There are others, like FILER and SYSCON, which can be extremely useful to you. In this session, you will learn to use the FILER utility.
This utility is used to control Volume, Directory and File information, and to change File and Directory security. On invocation, a menu as shown in Figure is displayed.
FILER - Main Menu
A brief note on some of the options available with this utility are included.
| Follow Up Next |
As an ordinary user, this option enables you to get the currently active directory's details such as ownership, date and time of creation, attributes, rights—effective, inherited as well as trustee. If the directory in question belongs to you, you can alter inherited rights, attributes and grant trustee rights to other users. As the supervisor, you can alter any of the directory details. A sample screen is shown in Figure.
FILER - Directory Information
| Follow Up Next |
This option allows you to do some of the tasks you are already familiar with, like deleting, copying, viewing files and file information.
To delete a file in the current directory, you select the file with the highlight bar from the list provided by the FILER, and press the <Del> key (refer Figure). The file will be deleted. Multiple files can be deleted as well. To do so, you move the highlight bar through the list of files and select them with the F5 key. After all the files have been selected, they can be removed by pressing the <Del> key. FILER seeks confirmation from you before it does the delete operation.
FILER - Directory Contents
FILER offers you an option to either delete all the files in any of the subdirectories listed, or delete the entire subdirectory structure. You select the subdirectory in which you want to do the delete operation with the <Del> key. You can then select the Delete Subdirectory Files only option (refer Figure) to delete only the files contained within. The Delete Entire Subdirectory Structure option will remove the entire directory structure. In either case, FILER will seek confirmation from you.
FILER - Delete Subdirectory Options
To copy files from the current directory, you select the file you wish to copy with the highlight bar. If multiple files are to be copied, you mark each one of them using function key F5. After selecting the Copy File option (refer Figure), you are prompted to enter the destination. The file(s) will then be copied.
FILER - File Options
To view the contents of a file, you select the file from the list provided, after which you will have to select the View File option to view the selected file's contents. If the View/Set File Information option is selected, you are provided information about the selected file.
The <Esc> key will take you out of any of the submenus to the next higher level.
To destroy confidential documents, we use a paper shredder so that even the torn pieces of paper cannot be put together. Similarly, if a confidential file is deleted and you do not want to risk someone salvaging the file and seeing its contents, you can use the PURGE command to remove it permanently. Files, once PURGED, cannot be recovered using the SALVAGE utility.
Very often you delete files that are no longer of use to you by using the DEL command of DOS. It may happen that you inadvertently delete files that are needed. There is no need to panic. The NetWare SAL VAGE utility enables you to recover these files.
All you need to do is specify the directory from which the file was deleted, give the name of the file that was deleted, and the file will be recovered.
For instance, if you want to recover a deleted file FORMAT.COM from the directory UTILS, you invoke the SALVAGE utility from the NetWare prompt. The Main Menu as in Figure is displayed on your screen.
SALVAGE - Main Menu
You select the option Select Current Directory and you are prompted to enter the name of the directory, in this case VOL1:UTILS, from where you want to recover the deleted file (refer Figure down).
SALVAGE - Current Directory Path
SALVAGE will then take you back to the Main Menu, where you select the option View/Recover Deleted Files. You are then prompted to enter the filename, in this case FORMAT.COM (refer Figure down). The file will then be salvaged.
SALVAGE - File Recovery
A wildcard pattern match can also be specified instead of the filename. SALVAGE displays a list of files that match the wildcard pattern from which you can select the files that you want to recover. At any time during this operation, if you want to return to the NetWare prompt, you press the <Esc> key.
Working on a node in Novell NetWare is as good as working on DOS, coupled with the advantage of having access to files on the server. NetWare allows you to use DOS commands to access files from the server. You are familiar with the tree-like directory structure of DOS and the fact that the NetWare structure is strikingly similar. Hence file management under NetWare will not pose much of a problem to you.
| Follow Up Next |
Any of the commonly used DOS commands, like DIR, DEL, REN, CD or MD give the same result in NetWare as they do in DOS. However, these commands may not work the way they are supposed to because of trustee rights and file attributes. For instance, you cannot see the contents of a file for which you do not have the Read right. A DIR command may tell you that a directory is empty, but the fact may be that you do not have the File Scan right in that directory.
Rights and attributes are not the only reasons for the failure of DOS commands to perform their desired tasks. For instance, if you specify the server and the volume name with the COPY command of DOS, it will not work.
Consider the directory structure given in Figure.
Directory Structure
If you want to copy a file SALEPKGE.BAT from the directory PROG of the volume VOL1 to the directory LIB of VOL2, then the command
C0PYV0Ll:PR0G\SALEPKGE.BATV0L2:LIB
will result in an error message being displayed.
You will encounter the same problem with all the other DOS commands because DOS does not support the concept of volumes. In such situations, where the use of the volume name is imperative, you have to use the equivalent commands provided by NetWare. These commands not only replace their DOS counterparts, but are more powerful and versatile. In case you do not know how to use a particular command, NetWare provides help for all commands through the HELP utility, which can be invoked by typing HELP at the NetWare prompt. Note that the NetWare commands possess a lot of options. Therefore, the slash (/) before an option and back slash (\) in path names can be used to avoid confusion although using the slash in path names is permitted.
| Follow Up Next |
Assume you are working in the directory USER and want to see the contents of the directory LIB under the volume VOL2. You can use the NetWare command NDIR to list its contents, the syntax is:
NDIR [path] [/option..]
The output is very much the same as that of the DOS DIR command: the names of the files/directories contained therein, their size in bytes and the date and time they were last modified. In addition, NDIR displays the date and time the files/directories were last accessed, their owner's name and the attributes assigned to them
Just like the DIR command of DOS, the NDIR command can also be used with wildcards. The command given below restricts the display of information to that pertaining to files that have the extension TXT.
NDIR V0L2:LIB\*.TXT
Very often you find yourself wanting to display details of files whose names cannot be matched by a common wildcard pattern. For instance, if you want to get information on the files SALES.DBF and TWO. DAT, you are not able to do so with a wildcard match. NetWare allows you to specify more than one filename with the NDIR command as shown below.
NDIR ONE.DBF, TWO.DBF
To view subdirectory information only in the directory BIN, for example, you can use the /DO option along with the command as given below.
NDIR V0L2:BIN/D0
Similarly, to view file information only in the same directory, the command
NDIR V0L2:BIN/F0
can be issued.
You can get information on files created by a particular user through the /OWNER option with the command
NDIR /OWNER = USER2
In the above example, NDIR will give you information about all the files owned by USER2 in the current directory. You can also find out details of files that are not owned by a specific user. The command
NDIR V0L2:LIB /OWNER NOT = USER2
will give you information about files not owned by USER2.
The date of creation of files/directories can sometimes be of great help. For example, if you forget the name of a file in which you had stored an important letter, but remember the date, the twenty-third of November 1994, on which you had created the file, the command
NDIR/CREATE EQ 11-23-94
will list the files that were created on that day, from which you can find the name of your file. The command
NDIR/CREATE BEF 11-23-94
will give you the details of files/directories created before the twenty-third of November 1994, while
NDIR/CREATE NOT BEF 11-23-94
will give you the details of files/directories created on the twenty-third of November 1994 and after.
The command
NDIR /CREATE AFT 11-23-94
will give you the details of files/directories created after the twenty-third of November 1994.
| Follow Up Next |
Just as you can rename files, NetWare allows you to rename directories as well. The command to do so is RENDIR. The syntax is:
RENDIR old-path-name new-name
When you rename a directory, you do not affect the attributes or drive mapping associated with that directory. You only change its name.
To change the name of the directory BIN in VOL2 to REPORT, you can give the command
RENDIR V0L2:\BIN REPORT
However, if you have mapped the directory to the G drive before giving the RENDIR command, you can use the drive name instead of the directory name as given below:
RENDIR G: REPORT
| Follow Up Next |
The command to copy files in NetWare is NCOPY. The usage of this command is similar to the COPY command of DOS. The advantage of using NCOPYis that you can copy files across volumes, which cannot be done through the COPVcommand as we have seen earlier. The syntax is:
NCOPY source-path destination-path
To copy all files from directory LIB to current directory, you can use the command
NCOPY V0L2:LIB\*.*
NCOPY can also be used to copy files from one directory in a particular volume to another directory in a different volume.
NCOPY VOL1:PROJ\*.* V0L2:LIB
will copy all the files from the directory PROJ in the volume VOL1 to the directory LIB in the volume VOL2.
Passwords and rights are both excellent security features on NetWare. They are enough to ensure that all your files and directories are not tampered with. But NetWare provides another line of defense in the form of file and directory attributes.
Attributes are special properties assigned to files and directories. Attributes override rights and prevent tasks that rights would allow. For example, if USER8 has the Erase right in a directory PROGRAMS, he or she would normally be able to delete files in that directory. However, if the files have the Delete Inhibit attribute set, this would not be possible.
Lists some important attributes along with their description.
| Attribute | Code | Description |
| Delete Inhibit | DI | Prevents erasure of files and directories. Overrides Erase right |
| Hidden | H | Hides files and directories from the DIR command of DOS, but not from the NDIR command if you have File Scan right |
| Purge | P | Purges files as soon as they are deleted (The purge command is dealt with later) |
| Read Only | RO | Indicates whether a file can be modified. (The attribute automatically turns on Delete Inhibit and Rename Inhibit attributes) |
| Rename Inhibit | RI | Prevents renaming of files and directories |
| All Attributes | ALL | Provides all available attributes |
| Normal | N | Clears all attributes |
Selective List of File Attributes
To assign attributes to a file, the command to be used is FLAG. The syntax is:
FLAG [path] [flaglist]
You may issue the FLAG command without any parameters to view the attributes of all files in the current directory. To view the attributes of a specific file, you can provide the filename along with the command. The command given below will display the attributes of the file EMPDAT.DBF.
FLAG EMPDAT.DBF
Wildcard characters can also be used along with the FLAG command. For example,
FLAG*.TXT
would allow you to view the attributes of all files with the extension TXT.
The FLAG command, like all NetWare commands, allows you to specify a volume name along with the path. For example, to provide Read-only and Hidden attributes to all files in the PROJ directory on volume VOL1, you may issue the command
FLAG VOL1:PROJ\*.*RO H
To provide all available attributes to all files in the current directory, the command
FLAG *.* ALL
can be used.
All attributes from the files in PROJ directory on volume VOL1 can be cleared with the command
FLAG VOL1:PROJ\*.* N
While the FLAG command allows you to change the attributes of files, the attributes of directories can be changed using the FLAGDIR command.
The FLAGDIR command allows you to change only the following attributes:
For a description of these flags refer to the table provided with the FLAG command.
Now that you know about rights and attributes, you should always ensure that you practice the following:
In NetWare, working in a directory where you do not have permission should be avoided because you may be shocked when a simple command like COPY does not work. Consider the following situation. You have made the root directory your currently active directory, and have tried to copy a file CP.BAT from the directory USER1 to the root directory. An error message is flashed on your screen! You cannot conclude that the COPY command does not work on NetWare. The reason is simple. You do not have the right to create files in the root directory. What are these rights all about?
Each user on NetWare is given a set of rights and has to work under these restrictions. It is one way by which NetWare protects your directories and files. Any operation, like copying, creating or deleting files, is controlled by these rights. They are given to you when your login is created by the supervisor, and are referred to as trustee rights. By default, on creation, all user logins belong to the group EVERYONE. You may also be made part of other user groups and hence inherit all the rights assigned to these groups. Apart from this, like every other user, you are given a special directory where you are assigned very special rights. Ordinary users will not have any rights in this directory and the subdirectories created therein by you.
The Table lists some important trustee rights available on NetWare.
| Rights | Code | Description |
| Read | R | Allows the reading and execution of files |
| Create | C | Allows the creation of directories and files |
| Write | W | Allows the modification of the contents of files |
| Erase | E | Allows the deletion of files and the removal of directories |
| Modify | M | Allows the changing of attributes and the renaming of files and directories |
| File Scan | F | Allows the viewing of file names with the DIR command |
| Access Control | A | Allows the user to grant/revoke rights to/from other users |
Selective List of Trustee Rights available on NetWare.
How do you find out the rights you possess for a particular directory? The answer lies in the NetWare command RIGHTS, for which the syntax is:
RIGHTS [path]
If a path is not specified along with the RIGHTS command, NetWare assumes that you want to see your rights in the current directory. Your rights are displayed in the format shown in Figure.
You can specify a path as well as a volume name along with the RIGHTS command. For example, if you want to see your rights of the directory GAMES on the volume VOL2, you can give the command
RIGHTS V0L2:GAMES
If you map drive J: onto the GAMES directory of the volume VOL2, you can save yourself the trouble of typing the volume and directory names by replacing them with the drive name as given below.
RIGHTS J:
The RIGHTS command also lets you see the rights you possess for a specific file. To view your rights for the file WIN.EXE, you can give the command
RIGHTS WIN.EXE
A cumulative list of all your rights in all the directories and subdirectories can be seen using the WHOAMI command with the /R option. The output would be as in Figure.
NIIT\SYS:USERS\ESG\FFC |
Output of the RIGHTS Command
You are user USER1 attached to server NIIT, Connection 9 |
Output of WHOAMI /R Command
In the directory allocated to you, you are generally given all the rights that were listed earlier. Other users cannot access your directories, if you choose not to let them do so. However, there are certain situations under which you may want to share one of your files/directories with someone else on the LAN. You can permit this by granting rights to him or her for your files and directories by using the GRANT command. The syntax is:
GRANT rightlist [FOR filename/dirname] TO username/groupname
Rights that can be granted are:
The command
GRANT R W F TO USER2
will grant Read, Write and File Scan rights for the current directory to the user USER2.
There are times when you would like to allow all the users belonging to a particular group, access to your files and directories. Rather than granting rights to all the users individually, which could be extremely laborious, you can grant the same rights to the group as a whole. For example, to grant Modify and Access Control rights to the group STAFF for the directory PROGS, you can issue the command
GRANT M A FOR PROGS TO STAFF
If you would like to grant all rights to a user USER1 for the directory GAMES, the command
GRANT ALL FOR GAMES TO USER1
will ensure the same.
Apart from granting rights for a directory, the GRANT command can also be used to grant rights to a user for specific files. For example, Write and Erase rights can be given by you to USER8 for a file START.BAT, by issuing the command
GRANT W E FOR START.BAT TO USER8
Now that you know how to give other users access to your files and directories, the need may arise, in due course, to take away these privileges. This can be achieved through the REVOKE command, for which the syntax is:
REVOKE rightlist [FOR filename/dirname] FROM username/groupname
Rights that can be revoked are the same as those that can be given away, with the exception of the No rights option that is not available with the REVOKE command.
Consider a situation in which you no longer want a particular user, USER2, to view the contents of your files in the current directory.
The command
REVOKE R FROM USER2
will achieve this.
If you would like to take away the Access Control right from the group STAFF for the directory PROGS, you may use the command
REVOKE A FOR PROGS FROM STAFF
To remove all rights from user USER1 for the current directory, you could use either one of the following commands:
REVOKE ALL FROM USER1
or
GRANT N TO USER1
To revoke the Write right for the file START.BAT from USER8, you can use the command
REVOKE W FOR START.BAT FROM USER8
The granting and revoking of rights is subject to the possession of the Access Control right. If you do not possess this right, you will not be able to grant or revoke rights.
In NetWare, the user can assign each of the letters of the alphabet (from A to Z) to a drive. NetWare recognizes 26 drives. The NetWare drives are not physical drives, but logical drives. Each of the alphabets is a pointer that points to a particular directory in the file structure.
By default, NetWare assigns alphabets A to E to local workstation drives, i.e. floppy disk drives and hard disk drives. Thus, NetWare assumes that a workstation can have a total of 5 floppy disks drives and hard disk drives. These drives are called local drives since they are local to the workstation.