Section 5-2: File Handling Commands on Various Operating Systems

[ Previous chapter ][ This chapter ][ Next chapter ] Depending on your environment, you need to know various commands to move, rename and view files. Some workstations or central computers offer a graphical user interface which you can use if you run the X-Windows environment. Ask your local computer experts if you want to do this. Don't be disappointed if the performance does not meet your expectations. These visual file systems work best if you are sitting directly in front of a workstation screen. They do not respond as quickly as you would like if you are in front of a PC or Mac-based X-terminal.

NOTE: The following sections refers to the command line. PC and Macintosh users will most probably use different environments, which are partially available via X-Windows for large systems as well. Ask your system manager for details.


Subsection 5.2.1

Navigation

 
what                              |      VMS               |     UNIX 
  
----------------------------------+------------------------+------------------- 
  
see where you are                 | show default           | pwd 
  
----------------------------------+------------------------+------------------- 
  
list files                        | dir                    | ls  
  
                                  +------------------------+------------------- 
  
dito, in detail                   | dir/size/date          | ls -lsa  
  
----------------------------------+------------------------+------------------- 
  
create subdirectory "test"        | create/dir [.test]     | mkdir test 
  
----------------------------------+------------------------+------------------- 
  
change to subdirectory "test"     | set default [.test]    | cd test
  
----------------------------------+------------------------+------------------- 
  
go one level up                   | set default [-]        | cd .. 
  
----------------------------------+------------------------+------------------- 
  
go to login directory             | set default sys$login  | cd ~/ 
  
----------------------------------+------------------------+-------------------                     
  

  


Subsection 5.2.2

Manipulation

 
what                              | VMS                    | UNIX 
  
----------------------------------+------------------------+------------------- 
  
copy file f1.dat to file f2.dat   | copy f1.dat f2.dat     | cp f1.dat f2.dat
  
----------------------------------+------------------------+-------------------                      
  
rename file f1.dat to file f2.dat | rename f1.dat f2.dat   | mv f1.dat f2.dat        
  
----------------------------------+------------------------+-------------------                      
  
delete file f1.dat                | delete f1.dat;*        | rm f1.dat 
  
----------------------------------+------------------------+-------------------                       
  
get rid of old file versions      | purge                  | (no file versions)
  
----------------------------------+------------------------+------------------- 
  
edit file f1.dat                  | edit f1.dat            | vi f1.dat 
  
                                  | OR eve f1.dat          | OR emacs f1.dat 
  
                                  |    (see sections below for details) 
  
----------------------------------+-------------------------------------------- 
  

  


Subsection 5.2.3

Output

 
what                              | VMS                    | UNIX 
  
----------------------------------+------------------------+------------------ 
  
view file f1.dat on screen        | type/page f1.dat       | more f1.dat 
  
view next page                    | <RETURN>               | <SPACE> 
  
quit this mode                    | <q>                    | <q> 
  
----------------------------------+------------------------+------------------ 
  
print file on queue "test"        | print/queue=test       | lpr -Ptest 
  
----------------------------------+------------------------+------------------ 
  

CAUTION: Print only what you have looked at before. If you print a file (text, graphics), make sure that you know where to print it (on a campus network). See below for details. Read the section "Need to Stop a Print Session" .


Subsection 5.2.4

Local Site Information for Printing

At the local campus, you can usually access various printers via the network. Type

% more /etc/printcap

to see how many print queues there are. Remember to print with

% lpr -P<QUEUENAME> <FILENAME>

where <QUEUENAME> is one of the print queue names found with the command 'more /etc/printcap'. If you need to stop a print job, type

% lpq

to determine the "entry" number of your print job, and then stop the job with

% lprm <ENTRYNUMBER>


[ previous chapter ],[ this chapter ][ next chapter ] , [next page/section] , or [overview] , or [table of contents]