Table of Contents
Commands for Lab
Submitting Your Code Electronically to Your Turnin Directory
If you have your directories set up appropriately (i.e., your lab
directory is in your cs111
directory), you should be able to run
turnin labx
where labx
is the name of the lab you are submitting. Using this command will ensure that all your permissions are set up appropriately.
If you want to know what's going on behind the hood, you could run this command from your cs111
directory:
cp -r labx /csci/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.
Creating Printable Files
To create a condensed, printable file of your lab, use the createPrintableLab
command.
The syntax of the command is
createPrintableLab <path_to_lab_directory>
For example, if you're in your labs
directory, to print lab1, you'd write
createPrintableLab 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.
evince postscriptfile.ps &
where postscriptfile.ps
is the name of the file that you want evince to open.
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
.
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.ps
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.ps
.