<< Back: Part 3 <<
Week Two Quick Reminders
[some of the topics and commands covered]
Directory Reminder Notes from Lesson Two:
- home - user's main directory
- public_html - where web documents reside. Contents viewable online.
- www - reference
back or mirror to public_html. Not difference in color in default PuTTY settings. Known
as a symbolic link.
- bin - normally binary executable files
- etc - system configuration files and settings
- tmp - temporary files
- var - system logs, user mail and
other temporary data
- lib - libraries
- usr - sub-directories may include:
- /usr/bin - commands and programs [not as important to UNIX
as bin/]
- /usr/local - customized files and data
- /usr/local/bin - locally installed programs
- /usr/local/man - the manual for local programs
- /usr/share - resources shared by more than one user account
Some Basic Unix Commands & Flags
- pwd [print working directory]
- . current directory
- .. parent directory
- ls [list]
- ls -C [columns....I see no change on my server]
- ls -F [identify slash = a directory * = an exe file @ = soft/symbolic link]
- ls -a [all]
- ls -x [format across]
- ls -R [recursive - show all files in sub-directories as well]
- ls -t [recently modified]
- ls -l [listing permissions long format see part 2 of the lesson.]
- ***Flags can be combined***
Example: ls -axF
- cd [change directory]
- cd ~ [takes you to your home directory from anywhere. plain
cd will get you there as well on my current server]
- cd .. [takes you up one level]
- cd ../.. [takes you up two levels]
- cd directory-name [takes you to the named directory]
- cd directory-name ; ls [commands divided by semi-colon both executed]
cd ls -aF directory-path [list contents of a directory you are not physically
inside..flags optional]
- tree -d . [layout of directory/ies displayed. Not space
and period . at end]
- cat [to read a specific file]
- more [similar to cat but delivered in small, screensized
chunks]
- less [similar to more, but does not exit file until you manually
input Q to quit]
- passwd [to change password]
Basic Shell Information
- sh - Bourne Shell [dates from 1979 still in use]
- csh - C Shell [commands similar to C programming language]
- ksh - Korn Shell [new features to improve workflow. commercial product]
- bash - Bourne Again Shell created 1988 [open source/GNU.
standard with most Linux systems said to be most versitile and user friendly
shell setup]
- tcsh - Variation of the C Shell with more options. Said to be more
user friendly
Environmental Variables
- << echo >> command
- [print or echo the output to your terminal. follow it with an enviromental
variable such as those below]
Finding Other Shells & Moving to Them Temporarily
- First place to check is /etc/shells . Try using the << cat >> command here.
- If they are not there, try the same process or ls in directories like /usr, usr/bin or usr/local/bin.
Example: ls /usr/local/bin/*sh
- To temporarily move to another shell, type the name at the bash $ prompt.
Example: $ /bin/tcsh
- Reminder: Be sure to exit a shell you are temporarily visiting.
History
Used to review and/or repeat commands
- Scroll up or down using the up and down arrow keys. When the command you want is found, hit the enter key.
- << history >> - [gives list of all commands]
- << history 25 >> - [lists set number of past commands indicated by number]
- !57 - [repeats command indicated by number]
- !! - [repeats last command]
Arithmetic
- << expr >> followed by any combination of the following:
- + for addition
- - for subtraction
- \* for multiplication
- \/ for division
Finding Information
- apropos [need a function? type in what you want to do after this command and it will give you lists of options]
- whatis [brief definitions]
- info [more detailed information. manual with menu interface]
The Ctrl Key can be used to access the
help menu. Ctrl+H is the command used. The letter C or a caret ^ [aka a cat
ear] normally represent this key. C-h would be the normal command.
<< Back: Part 3 <<