This is an old revision of the document!


Commands for Lab

Printing Files

To print from the command-line, you can use the lpr command. Do not try to print PDF files or images this way. The syntax of the print command is

lpr -P<printername> filename

For example:

lpr -Pcslab test.py

The printer name is cslab when you're in P405 or advlab if you're in P413.

The command lpr means to print the file. The option 'P' says which printer to use (one of the CS lab printers), and the argument says which file to print–in this case test.py.

Creating Printable Files

To create a condensed, printable file of your lab, use the createPrintableLab.sh command.

The syntax of the command is

createPrintableLab.sh <path_to_lab_directory>

For example, if you're in your labs directory, to print lab1, you'd write

createPrintableLab.sh lab1

will generate a file called lab1.ps containing all the printable files in your directory, not including subdirectories.

Errors

If your directory contains unprintable files, like binary files (e.g., .pyc or image files), you'll see an error message about unknown or special characters. Remove those files and run the command again.

Viewing a PS File: evince

To view a file, use the evince command. For example

evince lab1.ps &

Use the & to run the command in the background and continue to have use of your terminal.

If you can't use the terminal again, you probably need to close evince.

Copying to Your Turnin Directory

From your cs111 directory, run the command

cp -r labx /home/courses/coursename/turnin/username

where labx is the directory of the lab you want to copy, coursename is your course name, and username is your username.

If you have your directories set up appropriately, you should also be able to run

turnin.sh labx
labs/for_lab.1454288678.txt.gz · Last modified: 2016/02/01 01:04 by admin
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0