BASIC UNIX COMMANDS
Opening the UNIX
When in the Uniline Graphic User Interface assure
that you are on the front page of the system.
Once you are on the front page hit the "Front" Key
until the white UNIX page opens. If the Front key does not work
type "keyblock,off" followed by the "Enter" key
to unlock the UNIX keyboard. Then try the "Front" key
Note: Following each of these commands
the Enter key
is required to execute the command. UNIX is also case sensitive.
When typing in commands, file names or paths the case of each
character must be correct.
This command will show you the path (present
working directory) that you are presently in. When you are in UNIX
the directory path is not normally displayed. You will just see
a # as your prompt. To view the current path hit "pwd" followed
by the Enter key, the current path location will be displayed.
This command is used to list the files and directories
that are present in a path. The ls command can be used either by
itself in the directory you are in by hitting "ls" then
enter at the # prompt or can be used with a path definition following
the command. If you need to display a long directory list you may
use the pipeline ( | ) and ( more ) command to display the directory
one page at a time.
Remember when the system is connected to a network
you may have access to large drill file directories with many thousands
of files in them. If you use the ls command and define a drill
file path you may have to wait while thousands of file names are
displayed across the screen. Use the -l option to display a long
listing with file sizes, dates and times.
# ls /usr/cnc/M0/sys/
# ls /usr/cnc/ | more
# ls -l
This command is used to change directories. The "cd" command
requires additional instructions for its use. It can be used to
move down one level in the directory structure, to move to the
root directory of the system or to go to a specific directory as
# cd ..
# cd /
# cd /usr/cnc/M0/sys/
This command is used to display a file (like
the similar DOS type command). The "cat" command
requires that either a filename or a path and file name be used
to call the file up for display. When viewing long files a pipeline
( the " | " and " more " commands ) may be
used to display the file one page at a time.
# cat ExcCnc.cfg
# cat /usr/cnc/M0.sys/ExcCnc.cfg
# cat /usr/cnc/M0/sys/ExcCnc.cfg | more
This command is used to move a file to another
location and is also handy for renaming files. The "mv" command
cannot be used without defining a least a file name to be moved
and a file name and path to be moved to. This command is similar
to the DOS rename command.
# mv /usr/cnc/M0/sys/SHUTDOWNDATA /usr/cnc/M0/sys/JUNK
# mv SHUTDOWNDATA /usr/cnc/M0/sys/JUNK
This command is used to make a copy of a file.
The "cp" command cannot be used without defining a least
a file name to be copied and a file name and path to be moved to.
This command is similar to the DOS copy command.
# cp /usr/cnc/M0/sys/SHUTDOWNDATA /usr/cnc/M0/sys/JUNK
# cp SHUTDOWNDATA /usr/cnc/M0/sys/JUNK
This command is used to delete files. The "rm" command
cannot be used without defining a least a file name to be deleted.
Be careful when utilizing this command as it executes immediately
and does not ask for confirmation. This command is similar to the
DOS del command.
# rm /usr/cnc/M0/sys/SHUTDOWNDATA
This command is used to create a new directory.
This command will make a new directory with the name and path specified.
# mkdir /usr/cnc/SETUPFILES
This command is used to create a delete a directory.
This command will delete only the specified directory if it is
# rmdir /usr/cnc/SETUPFILES