0% found this document useful (0 votes)
124 views3 pages

Unix Commands PDF

unix commands

Uploaded by

Raul Yondo
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
124 views3 pages

Unix Commands PDF

unix commands

Uploaded by

Raul Yondo
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

CS004

Introduction to Scientic Computing

Triandopoulos

UNIX Command Reference


Spring, 2010
The basic format of a unix command is command options arguments.

General
Terminate your current session, or shell. Display the Unix manual page describing a given Unix command. Locate commands by keyword lookup.

exit man command apropos command

File System Navigation


Return to your home directory. Change directory to make dir your current directory. List the contents of the current directory. List the contents of the directory; names can name les and/or directories: List the contents of the directory in a long format, showing permissions, owner, size, and other le info. List all les in the directory, including hidden les (le names that begin with a dot .). Display the name of the current directory, or print working directory. Determine le type.

cd cd dir ls ls names ls -l ls -a pwd le les

CS004

UNIX Command Reference

Spring, 2010

File/Directory Manipulation
Copy le(s) (from le1 to new le, le2 ). Copy le(s) into a directory. Copy a directory and, recursively, its subdirectories. Create, or make a directory. Move a le or, if le1 and le2 are in the same directory, rename a le. Move les into a directory. If directory dir2 exists, move dir1 into dir2 ; otherwise, rename dir1 as dir2. Remove (erase) le(s). (BE CAREFUL) Remove (by force) les, directories, and recursively, any subdirectories. Remove directory (directory must be empty).

cp le1 le2 cp les directory cp -r dir1 dir2 mkdir directory mv le1 le2 mv les directory mv dir1 dir2 rm les rm -rf names rmdir directory

Data Manipulation
Display les to the shell. Display all lines in the les that match a pattern. Display contents of les one screen at a time. Order the lines in a le or les alphabetically (this command does not alter the le or les it merely displays the sorted output to the screen): . . . in reverse order. . . . numerically (puts 2 before 10 instead of after).

cat les grep " pattern " les more les sort les

sort -r les sort -n les

CS004

UNIX Command Reference

Spring, 2010

Networking/Communications
Locks your screen when you are away from the computer. Connect to a remote host using Secure Shell. Sends a Zephyr message to a user. Displays more information about a user. Displays the logins of everyone logged in to the SunLab. Displays the logins of everyone logged in on a specic oor of the CIT. Like ll, except highlights all the students in a specic class.

xlock ssh hostname zwrite user nger user ll oor oor-number lw -I course-number

Software
A basic GUI text editor, a lot like Windows notepad A powerful GUI text editor built upon vim A powerful GUI text editor built upon emacs A basic shell text editor A powerful shell text editor A pdf viewer A web browser A GUI email client An email client that runs in the terminal An instant messaging client An Asteroids game

gedit gvim xemacs pico vim xpdf refox thunderbird pine gaim parsec

More...
http://www.cs.brown.edu/ugrad/tech/unix.html http://cs.brown.edu/ugrad/tech/slides/unixintro.pdf http://amath.colorado.edu/computing/unix/cheatsheet/A.pdf

CS department reference Minicourse for UNIX Cheat Sheet

You might also like