| Command | Description
|
| ls | List contents of a directory, use -l to get more information.
|
| cd | Change Directory; with no arguments, goes to your home directory.
|
| rm | Remove (delete) a file. Use -r to remove a directory, but be careful!
|
| cp | Copy a file. If you give more than two arguments and the last is a directory, it will copy all the files into the directory. Use -R to copy directory trees.
|
| rmdir | Remove a Directory, but only if it's empty (otherwise use rm -r).
|
| mkdir | Make a Directory (create a new one).
|
| touch | Change the modification times of a file, or create one by that name if one doesn't exist. Useful before make, which checks timestamps to decide which commands to run.
|
| du | Disk Usage - tells you how much space files take up.
|
| pwd | Print Working Directory - tells you your current directory.
|
| umask | Sets the mask for creating new files - new file permissions will be 777 - the value you give to umask (except new files don't get execute permissions).
|
| ln | Link - creates a link from one file to another (use -s for symbolic links, which you usually want to do).
|
| chmod | Change mode - set file permissions. Chmod <number> <filename> sets the file's permissions to the number, whose digits are combinations of 4 (read), 2 (write), and 1 (execute), and the hundreds digit tells owner permissions, the tens digit group permissions, and the ones digit world permissions.
|
| chown | Change owner - give a file to another user.
|
| chgrp | Change group - give a file to another group.
|
| whoami | Tells you your username (the special syntax "who am i" also works).
|
| who | Tells who's logged onto the system.
|
| finger | With no arguments, tells who's logged onto the system; when given a username, gives more info about that user.
|
| w | Tells who's logged onto the system, and what command they've last run.
|
| su | Super User - Assume permissions of another user (usually root).
|
| sudo | Super User Do - Used as a prefix for a command; it gives you root privileges for the purposes of that command.
|
| passwd | Password - Change your password.
|
| vi | The best editor ever (take that, Sam!).
|
| cat | Concatenate - prints out the contents of file(s).
|
| tac | Prints out files backwards (the name is cat backwards).
|
| head | Prints the beginning lines of a file.
|
| tail | Prints out ending lines of a file.
|
| less | Shows a file a page at a time.
|
| od | Octal dump - print out a file, with octal character numbers instead of the data interpreted as characters.
|
| wc | Word count - count the lines, words, or characters in files.
|
| grep | Global Regular Expression Print - search files for a pattern (the pattern is a regular expression, which another LUG member will present on at some point).
|
| sed | Stream Editor - print out a file, but manipulate it in a variety of ways, such as removing lines or performing regular expression substitution, before printing.
|
| awk | A mini-programming-language for dealing with "flat-file" databases.
|
| tr | Transform - replace certain characters with other characters, or squeeze spaces.
|
| split | split a file into several files, each (except for the last) a predetermined size (in lines or bytes).
|
| cut | Extract fields from a flat-file database.
|
| paste | Join files into a flat-file database by joining corresponding lines with the separator character.
|
| join | Join two flat-file databases where a field matches.
|
| sort | Sorts input lines.
|
| uniq | Unique - squeeze duplicate lines into one. This command only works if the duplicate lines are consecutive, so it's used primarily after sort.
|
| diff | Difference - show how two files are different, line-by-line.
|
| comm | Compare - compare sorted files based solely on the existence of duplicate lines, rather taking their order into account as well as with diff.
|
| man | Manual - get information about a command.
|
| apropos | Look up commands about a topic.
|
| kill | End a process by sending an appropriate signal (use -9 to guarantee it ending).
|
| ps | List running processes.
|
| cron | Schedule automatic jobs.
|
| nohup | Used as a prefix to a command to indicate that it should keep running after you logout.
|
| nice | Affect the priority of a process (you must be root to increase a process's priority, which is decreasing it's nice value).
|
| time | Used as a prefix to a command - when the process ends, time reports how much time it took.
|
| date | Tells you what time it is.
|
| cal | Calendar - displays a calendar.
|
| expr | Expression - Evaluate an integer expression.
|
| factors | Factor an integer into primes.
|
| seq | Sequence - make a sequence from one number to another.
|
| bc | Base Calculator - acts as an arbitrary-precision desktop calculator.
|
| echo | Print command-line arguments.
|
| yes | Prints command-line arguments until yes is aborted.
|
| uname | Give you information about your machine and OS.
|
| ssh | Secure Shell - connect to a remote host to execute commands on it.
|
| netcat | Network Concatenate - send/receive text on arbitrary ports (talk to Andy about this one).
|
| wget | Web Get - Save a file from the internet.
|
| lynx | A text-mode web browser.
|
| stty | Set TTY - set terminal options. TTY is an abbreviation for teletype, and refers to a terminal.
|
| clear | Clear the screen (Ctrl-L also works).
|
| perl | Python is better (take that, Sam!).
| |
|