Princeton University Library Data and Statistical 
Services

Search DSS





Finding Data Analyzing Data Citing data

About Us


DSS lab consultation schedule
(Monday-Friday)
Sep 1-Nov 3By appt. here
Nov 6-Dec 15Walk-in, 2-5 pm*
Dec 18-Feb 2By appt. here
Feb 5-May 4Walk-in, 1-5 pm*
May 7-May 15Walk-in, 2-5 pm*
May 16-Aug 31By appt. here
For quick questions email data@princeton.edu.
*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.

Follow DssData on Twitter
See DSS on Facebook
Home Online Help Unix Unix Command Summary

Summary of Common Commands

This table summarizes some common unix commands and may be printed for quick reference. Other commands may be available for the same or similar tasks.

Task Command Example
Working With Files

List files

ls

ls -alF

Copy

cp fromfile tofile

cp prog1 prog2

Delete

rm filename

rm data.csv

Move files

mv fromname toname

mv /scratch/big.data bigdata

Rename files

mv oldname newname

mv old.data new.data

Display the contents of a file

more filename

press the ENTER key to advance a line at a time; press the SPACE bar to advance a screen at a time; press CONTROL-C to end

Find a file

find "directory" -name "filename" -print

If you know the name of a file but not where it is, cd to your home directory and use 'find . -name "filename.txt" -print'

Working with Directories

Show working directory

pwd

pwd

Change working directory

cd dirname

cd jp

Change to home directory

cd

cd

Change to parent directory

cd ..

cd ..

Create directory

mkdir dirname

mkdir thesis

Remove directory

rmdir dirname

rmdir loveltrs

Printing

Print a file

lpr -P printername filename

lpr -P nslaser extract.sas

Printer status

lpq -P printername

lpq -P nslaser

Cancel print job

lprm -P printername jobnum

lprm -P nslaser 123

List available printers

printers -L

printers -L | more

Other Commands

Check how much disk space you can use

quota -v

quota -v

Edit a file

pico filename

pico thesis1.do

Edit a file

vi filename

vi thesis2.do

Modify access permissions

chmod attrs filename

chmod o+r pubinfo

Display environment variables

env

env

Display a calendar

cal month year

cal

Display current date and time

date

date

Help on a command

man commandname

man cp
or lookup man pages

Help on a keyword

man -k keyword

man -k mail

See who is logged on

who

who

Look up someone's email address

ph name

ph Jane Doe


This page last updated on: