Do Some Basic UNIX: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 67: | Line 67: | ||
</ul> | </ul> | ||
<font face="courier">chmod 744 <i>filename</i></font> | |||
<ul> | <ul> | ||
<li type="1">owner read, write, execute</li> | <li type="1">owner read, write, execute</li> | ||
| Line 136: | Line 136: | ||
<td bgcolor="paleGoldenrod"><font face="verdana,arial">*</font></td> | <td bgcolor="paleGoldenrod"><font face="verdana,arial">*</font></td> | ||
<td>unix wild card - matches all file names (except those beginning with '.') | <td>unix wild card - matches all file names (except those beginning with '.') | ||
e.g. <font face="verdana,arial">rm *</font> will remove all files from the current directory! | |||
<p> | |||
<b><font color="#FF0000" size="+1">You will absolutely never type 'rm *'. Ever.</font></b> | |||
<p><i>Always type something like</i><font face="verdana,arial"> "ls *" </font>first to verify what such a wildcard will match | |||
</td> | </td> | ||
Revision as of 20:52, 11 September 2006
Some basic unix commands
Want more? Try the excellent tutorials at FreeEngineer.org, Mayo, UnixGeeks.org or Idaho state
| Command | Meaning |
|---|---|
| man function | show the manual page for a function |
| top | shows currently running processes - do not leave this running for more than 30sec (ctrl-c) |
| ps | show the names of all running processes |
| mkdir dir_name | create a sub-directory of the current directory |
| rmdir dir_name | remove a directory. You must remove files in the directory first. |
| cp source dest | copy a file or directory from source to dest |
| rm file_name | remove a file (permanent!) |
| chmod xxx file_name | change the file permissions:
Three numbers indicate the permissions for the owner, the group and the world.
|
| ls | list contents of current directory |
| ls -l | list the contents of the directory (long form, showing sizes) |
| ls dir_name | list the contents of the named directory |
| cd dir_name | change to the named directory |
| pwd | show the name of the current directory |
| . | the current directory |
| .. | the parent directory of this directory |
| more file_name | print out the contents of the named (text) file |
| df | show the free space on the present disk |
| du | show the disk usage on the system |
| * | unix wild card - matches all file names (except those beginning with '.')
e.g. rm * will remove all files from the current directory! You will absolutely never type 'rm *'. Ever. Always type something like "ls *" first to verify what such a wildcard will match |
| xemacs file_name textedit file_name |
These are all text editors that are found commonly on unix systems. Most people seem to prefer xemacs, but each has its adherents. |
| ? | matches any single character |