Looking at files: Print and View Commands
Next: Working with Programs
Up: Specific Unix Comm
Previous: File Manipulation Comm
You can try any of these commands by cutting them with your mouse and pasting
them into a UNIX window. If there are filenames or other variables you need
to change, they are indicated by italics .
PRINT COMMANDS
lpr file
Print file on line printer under BSD.
lp fname
Print file on line printer under System V.
lpq
Return status of jobs in print queue (BSD).
lpstat
Return status of jobs in print queue (System V).
VIEW COMMANDS
- cat file
- Print file on screen (or as directed by >, >>).
- more file
- Print file, one screenful at a time.
- view file
- Use the vi editor for viewing a file.
- head file
- Print first 10 lines of file.
- tail file
- Print file's last 10 lines on screen.
Next: Working with Programs
Up: Specific Unix Comm
Previous: File Manipulation Comm