Unix Commands PDF
Unix Commands PDF
Triandopoulos
General
Terminate your current session, or shell. Display the Unix manual page describing a given Unix command. Locate commands by keyword lookup.
CS004
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
CS004
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