// read/write/execute rights in owner/group/everyone // file_size time file_name
chmod a+x ex // add permission to execute ex to all
Symbol
Meaning
u
user
g
group
o
other
a
all
r
read
w
write and delete
x
execute and access directory
+
add permission
-
take away permission
summary of process control
foreground: terminal suspend and wait background: terminal can go on
Command
Meaning
ls -lag
list access rights for all files
chmod [options] file
change access rights for named file
command &
run command in background
^C
kill the job running in the forground
^Z
suspend the job running in the foreground
jobs
list current jobs
bg %2
background the suspended job
fg %1
foreground job number 1
kill %1
kill job number 1
ps
list current processes
kill 310
kill process id 310
1 2 3 4 5 6 7 8 9 10 11 12
df . // report space left on the file system ls -lh gzip gunzip // unzip tar -xvf .tar // extract diff file1 file2 // < denotes file1, > denotes file2
history // terminal history !! // recall last command !-3// recall third most recent command !grep // recall last command starting with grep
Tutorial Seven & Eight
Install software:
Locate and download the source code(which is usually compressed)
Unpack the source code
Compile the code(Most difficult)
Install the resulting executable
Set paths to the installation directory
make:manage large programs and only compiling those parts changed Makefile: record the related make rules, contains information on how to compile the software.
Some simplest way to compile a package:
cd to the directory containing the packages’ source code.
Type ./configure to configure the package for your system
Type make to compile the package
Optionally, type make check to run any self0tests that come with the package.
Type make install to install the programs and any data files and documentation.
Optionally, type make clean to remove the program binaries and object files from the source code directory.
UNIX variables
two categories: Environment variables, Shell variables Shell variables: apply only to the current instance of shell and set short-term working conditions. Environment variables: system environment with UPPER CASE name
1 2 3
echo $PATH // print system environment set PATH=($PATH ~/new_path/) // add path to PATH