![]() |
![]() |
Task Reference: HP 3000 Series 9X8LX Computer Systems > Chapter 1 Learning to Use MPE/iX Commands![]() Working with Files |
|
You have learned to log on to your account, to look at your account or group, and to create text files. In this section, you will practice:
For the following exercises, use the FILE1 file that you created in the previous section. When you log on to the system, you are in a group within an account such as YOURGRP.YOURACCT. Files you work with, such as FILE1, can be referred to as FILE1.YOURGRP.YOURACCT or file1.yourgrp.youracct. MPE syntax automatically converts lowercase letters to uppercase. With the advent of the hierarchical file system, you can also refer to a file using the HFS syntax. That same file can be referred to as /YOURACCT/YOURGRP/FILE1. It is the path to the file or the pathname.
The first / in the pathname refers to the level above the account and is called the root directory. It is used as a way to reference files on the system. See Title not available. Title not available shows a picture of your file's location in the file system. YOURACCT is one level below the root directory. You logged on to YOURACCT and were placed into YOURGRP. Then you built a file called FILE1. Any other files that you have in YOURGRP are also located there with FILE1. You can refer to a file using either the MPE or HFS syntax. Earlier you created a file called FILE1.
You can list the file with MPE syntax:
OR (using the exact capitalization shown)
Both display the same result:
Be careful! HFS syntax is case sensitive but MPE syntax is not. You can type the following command, using MPE syntax in lowercase, and locate uppercase FILE1 in YOURGRP in YOURACCT. Try it.
That's because MPE syntax upshifts everything. But because HFS syntax is case sensitive, the following command will not find FILE1 in YOURGRP in YOURACCT:
YOURACCT is not the same as youracct in HFS syntax. A directory is a work area similar to an MPE group where you can put related files. You can create directories in your group and account. You must precede file and directory names with ./ or / to use HFS syntax. Dot (.) means current working directory or where you are working within the file system. So ./ lets you use HFS syntax in your current working directory.
This command creates Directory1 in your current working directory. HFS syntax accepts the name exactly as you type it in uppercase and lowercase, and the name can be up to 16 characters long when created directly under a group. Watch out! If you try to create the directory without including ./ before the name, MPE/iX treats the name as a regular MPE name. It converts the letters to all uppercase. Try typing the following command:
Also notice: If you type the following command, MPE/iX creates a directory called DIR2 (uppercase). That is because you are using MPE syntax. Try it.
In the next section, you'll learn how to list the directory. Title not available shows a picture of the file system including the directories that you just created. To rename the file called FILE1, enter:
Notice the punctuation. The comma (,) is necessary to rename a file. Use the LISTFILE command to check that FILE1 has disappeared and that a file called YOURFILE has appeared. Enter:
Your screen should look like this:
To copy a file, use the COPY command, specifying the name of the file that you want to copy and the name that you want the new, identical copy to have. To make a copy of YOURFILE, calling the new copy NEWFILE, do this:
Now enter:
Your screen should look like this:
Here is what the parameters do:
There is an easier way to use the COPY command. Try this now:
Use the LISTFILE command, and you should see the new file named DOCFILE on your screen. You may want to allow another user to copy your files. In order to do this, you must release your file to this person. This is called releasing a file. The RELEASE command removes the security provisions for a file. You can only release files that you have created. To remove the security provisions of the file YOURFILE, enter:
This file is now ready to be copied to another account and group. Once your files have been released, you can move these files to other groups. To copy a file from one group to another group:
Do this:
Then enter:
You should see a copy of the YOURFILE file. Make sure that you are in your home group PUB. The PURGE command erases a file. It erases one file at a time. If you want to erase five files, you now need to use the PURGE command five times. Delete the file called DOCFILE. Enter:
If you try to delete a file that does not exist, you get an error message. Try to delete the file QUIKSAND. What happens? Your screen should look like this:
|