CSC161 2011S Imperative Problem Solving
[Skip to Body]
Primary:
[Front Door]
[Schedule]
[Piazzza]
-
[Academic Honesty]
[Instructions]
Current:
[Current Outline]
[Current EBoard]
-
[Current Assignment]
[Current Lab]
[Current Reading]
Groupings:
[Assignments]
[Documents]
[EBoards]
[Examples]
[Exams]
[Handouts]
[Labs]
[Outlines]
[Readings]
Related Courses:
[CSC195 2003S (Rebelsky)]
[CSC161 2009F (Coahran)]
[CSC161 2010S (Walker)]
[CSC161 2010F (Rebelsky)]
Misc:
[SamR]
[ISO]
[GNU Coding Standards]
Sam's attempt to summarize the important Linux commands we have covered
this semester. The commands are in alphabetical order. Parameters in
square braces are optional (such as the files in cat). In
most cases, commands that take files as parameters will read from standard
input if given no file.
| Command | Purpose | Common Options | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
cat [file(s)] |
Display the contents of a file or files |
|
||||||||
cd directory |
Change working directory | none | ||||||||
evince file |
View PDF and PostScript files | none | ||||||||
head [file] |
Get the first few lines of the given file. | none | ||||||||
history |
List the most recent commands | none | ||||||||
ls directory |
List files and directories |
|
||||||||
man command |
View the manual page for a command |
|
||||||||
mkdir directory |
Create a new directory |
|
||||||||
popd |
Popthe most recently pushed directory, returning to that directory |
none | ||||||||
pushd directory |
Pusha directory, remembering it so that you can return with popd |
none | ||||||||
pwd |
Print (or present) working directory | none | ||||||||
sleep secs |
Pause for the given number of seconds. | none | ||||||||
whereis cmd |
Determine where various parts of a program are | none | ||||||||
which cmd |
Determine where a program is | none |
You've also learned some common ways to glue commands together or to take the output of one and send it to another.
| Form | Purpose | Notes |
|---|---|---|
cmd > file |
Send the output of cmd to the given file. |
|
cmd >> file |
Append the output of cmd to the given file. |
|
cmd < file |
Read the input of cmd from the given file. |
|
cmd0 | cmd1 |
Run cmd0 sending its output to cmd1 |
[Skip to Body]
Primary:
[Front Door]
[Schedule]
[Piazzza]
-
[Academic Honesty]
[Instructions]
Current:
[Current Outline]
[Current EBoard]
-
[Current Assignment]
[Current Lab]
[Current Reading]
Groupings:
[Assignments]
[Documents]
[EBoards]
[Examples]
[Exams]
[Handouts]
[Labs]
[Outlines]
[Readings]
Related Courses:
[CSC195 2003S (Rebelsky)]
[CSC161 2009F (Coahran)]
[CSC161 2010S (Walker)]
[CSC161 2010F (Rebelsky)]
Misc:
[SamR]
[ISO]
[GNU Coding Standards]
Disclaimer:
I usually create these pages on the fly
, which means that I rarely
proofread them and they may contain bad grammar and incorrect details.
It also means that I tend to update them regularly (see the history for
more details). Feel free to contact me with any suggestions for changes.
This document was generated by
Siteweaver on Wed Jan 26 15:02:38 2011.
The source to the document was last modified on Wed Jan 26 15:02:37 2011.
This document may be found at http://www.cs.grinnell.edu/~rebelsky/Courses/CSC161/2011S/Documents/linux-commands.html.