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
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
cp -r labx /csci/courses/coursename/turnin/username
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
The syntax of the command is
For example, if you're in your
labs directory, to print lab1, you'd write
will generate a file called
lab1.ps containing all the printable files in your directory, not including subdirectories.
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 postscriptfile.ps &
postscriptfile.ps is the name of the file that you want evince to open.
evince lab1.ps &
& 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
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
lpr -Pcslab test.ps
The printer name is
cslab when you're in P405 or
advlab if you're in P413.
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