Search DSS Finding Data Analyzing Data Citing data About Us DSS lab consultation schedule (Monday-Friday)
*No appts. necessary during walk-in hrs. Note: the DSS lab is open as long as Firestone is open, no appointments necessary to use the lab computers for your own analysis. |
Home Online Help Unix Unix Commands
Common Unix Commands
Working with Files
Working with DirectoriesFiles on UNIX are stored in directories. These are much like the directories on a PC or folders on a Mac. When you log on to your UNIX account, you are placed in your "home directory." Within your home directory you can have other directories, called "sub-directories." These sub-directories can also have other directories within them. Directories make organizing your files easy. You can put all of your data files in one directory and all your programs in another, or, you can have a directory for each class you are taking. The term "path" is often used to refer to directories and their subdirectories.
PrintingBefore printing, you must determine which printer you want to use; not all printers are capable of printing from UNIX. Also, check the size of the file before you print it to avoid uneccesary use of paper and toner. To see a list of available printers, issue the command: printers -L | more This will give you a list of printers and their locations, as well as the alias by which you can refer to them. Once you have identified the printer you want to use, issue the lpr command lpr -P [printeralias] [filename] where printeralias is the alias for a printer and filename is the name of the file you would like to print. For example: lpr -P nslaser test.do will print a file named test.do, to nslaser, a printer in New South Building. QuotasYour UNIX account has a certain amount of space in which you can store files. The following command will show you how much space you are given ("quota") and how much you are currently using ("usage"). quota -v Running out of space is a common reason why you cannot create, copy or transfer new files into your account. Files created or modified when you are at or over your quota may be corrupted! There is a buffer space (the difference between your quota and your "limit"). However, this is small and only temporary. If you do not clear space that is over your quota, you will lose files. See below for solutions if you need more space. Temporary Storage and Extra SpaceSometimes you may need extra space for just a short time, say to edit a very large file. You can access temporary storage in the /scratch directory. To do this, simply issue the command: mkdir /scratch/[userid] where userid is your userid. Be sure to use the slash (/) in front of scratch. Now you can cd to this new directory and work with files in it just as you would in your own account. The system automatically erases files in the scratch directory 24 hours after they were last modified, so be careful not to leave anything important there. If you find that you need more space on a permanent basis, then you can apply for a larger quota. Although there is a charge involved, academic departments will pay it for students who require the space for their research. See your department's undergraduate or graduate secretary. You can pick up the application at OIT (87 Prospect Ave) then get your department to authorize it. Text EditorsThere are several text editors available on UNIX. Among these are vi, emacs, and pico. Which one you use is a matter of personal preference. Try each and see what suits your needs best. Pico is similar to the editor used in the mail program, Pine, so if you already use Pine, Pico may be a good choice. HelpYou can get help on any command in UNIX by using the following command: man [command] where command is the command with which you need help. For example, to get information on the copy command, cp, your would type: man cp If you do not know the command you want you can type man -k [keyword] where keyword is a topic rather than a specific command. You can also use the Internet to look up UNIX man pages. Resources
|