Introduction to UNIX - PowerPoint PPT Presentation

1 / 32
About This Presentation
Title:

Introduction to UNIX

Description:

Utilities programs to list files, tell who is on the system, what processes ... drwx- 2 donnab 3584 Apr 10 2002 mail -rw- 1 donnab 45927 May 8 11:59 myfile.txt ... – PowerPoint PPT presentation

Number of Views:64
Avg rating:3.0/5.0
Slides: 33
Provided by: donnaba
Category:
Tags: unix | apr | intro | introduction

less

Transcript and Presenter's Notes

Title: Introduction to UNIX


1
Introduction to UNIX
donna Bair-Mundy
2
What is UNIX?
Applications
Operating System
Hardware
3
Operating system functions
Keeps track of types and locations of hardware
Intermediary between applications and hardware
Maintains directory of files
Manages how data is stored
4
User instructions to operating system
When to run a program
Creating and naming directories
Copying files between directories or onto disks
Setting access permissions
5
Unix operating system

ls
myfile.txt yourfile.txt
Command-line interface
Utilitiesprograms to list files, tell who is on
the system, what processes are running, etc.
Editorsuse to create HTML files for Web portals
6
Unix environment - now
terminals
Hi!
Ho!
Hi!
Ho!
host
terminals
7
Unix environment - then
host
terminals
8
UHUNIX file structure
Root directory
bin subdirectory
home subdirectory
usr subdirectory
1 subdirectory
18 subdirectory
24 subdirectory
johnd Home directory
donnab Home directory
nahl Home directory
9
Basic UHUNIX commands
pwd print working directory tells you where
you are in the file hierarchy
ls list lists files and subdirectories
cd change directory Moves you up or down in the
file hierarchy
chmod change mode Assigns access rights to files
and directories
10
More UHUNIX commands
man manual man command provides access to
electronic help files
cp copy cp sourcefile destinationfile copies the
source file to a file with the destination file
name
rm remove file Deletes a file
mkdir make directory Creates a new directory
11
Where am I pwd (print working directory)

pwd
/home/18/donnab
12
What files and directories do I have ls (list
files)

ls
aardvark.txt mail myfile.txt public_html whatsup.d
oc
13
The "all files" option ls -a

ls
-a
. .. .addressbook .cshrc .inbox .login .logout .pi
nerc
.signature .ssh2 aardvark.txt mail myfile.txt publ
ic_html whatsup.doc

14
The "long' option ls -l

ls
-l
-rw------- 1 donnab 47616 May 8
1159 aardvark.txt drwx------ 2 donnab 3584 Apr
10 2002 mail -rw------- 1 donnab 45927 May
8 1159 myfile.txt drwxr-xr-x 5 donnab
1024 Mar 20 1351 public_html
ls -la
15
Changing my working directory cd (change
directory)
cd change directory

cd public_html

pwd
/home/18/donnab/public_html
cd fun/images

pwd
/home/18/donnab/public_html/fun/images
16
Changing to a higher-level subdirectory cd ..
/home/18/donnab/public_html/fun/images
cd ..
Note space preceding dots
pwd
/home/18/donnab/public_html/fun/
cd ..
pwd
/home/18/donnab/public_html/
cd /bin
17
Changing access rights to a file or directory
chmod (change mode, part 1)

ls -l
-rwx------ 1 donnab 47616 May 8
1159 myfile.txt drwxr-xr-x 5 donnab 1024 Mar
20 1351 public_html

- r w x - - - - - -
owner
group
public
18
Changing access rights to a file or directory
chmod (change mode, part 2)

ls -l
-rwx------ 1 donnab 47616 May 8
1159 myfile.txt drwxr-xr-x 5 donnab 1024 Mar
20 1351 public_html
chmod
755
myfile.txt

ls -l
-rwxr-xr-x 1 donnab 47616 May 8
1159 myfile.txt drwxr-xr-x 5 donnab 1024 Mar
20 1351 public_html
r w x r - x r - x
owner
group
public
19
Binary numbers (part 1)
Base 10
Base 2
1
2
7
1
1
1
1
1
1
1
1
10
100
1
2
4
8
16
32
64
20
Binary numbers (part 2)
Base 2







1
2
4
8
16
32
64
7
7
Decimal
- 4
3
Base two



1
1
1
- 2


7
1
1
2
4
21
Binary numbers (part 3)
Base 2







1
2
4
8
16
32
64
6
6
- 4
2



1
1
0
- 2
4 2 0 6
1
2
4
0
22
Binary numbers (part 4)
5
Base 2



1
2
4
0
1
1
1
0
0
1
0
1
Selection A
Selection B
Selection C
23
Oops
5
Base 2
0
1
1
1
2
4
2

1

3
Try again
24
Oops
5
Base 2
1
0
0
1
2
4
4

0

0

4
Try again
25
Congratulations!
5
Base 2
1
0
1
1
2
4
4
0
1

5
Yes!
26
Changing access rights to a file or directory
chmod (change mode, part 3)

chmod 755 myfile.txt
-rwxr-xr-x 1 donnab 47616 May 8
1159 myfile.txt drwxr-xr-x 5 donnab 1024 Mar
20 1351 public_html
rwx r-x r-x

111 101 101
7
5
5
owner
group
public
27
Getting help man command

man
chmod
User Commands
chmod(1) NAME chmod - change the
permissions mode of a file DESCRIPTION chmod
changes or assigns the mode of a file. The mode
of a file specifies its permissions and other
attributes.
28
Getting help man -k

man
-k
mode

more
access access (3f) - return access mode
(r,w,x) or existence of a file cggglm cggglm
(3p) - solve a general Gauss-Markov linear model
(GLM) problem chmod chmod (3f) - change
mode of a file dggglm dggglm (3p) - solve a
general Gauss-Markov linear model (GLM) problem
f77_ieee_environment f77_ieee_environment
(3f) - mode, status, and signal handling for
IEEE arithmetic fegetprec fesetprec (3m) -
control floating point rounding precision modes
29
Making back-ups cp (copy)

cp
myfile.txt
myfilebk.txt

ls
myfile.txt myfilebk.txt
my_file.txt
my file.txt
30
Deleting a file rm (remove)

ls
myfile.txt myfilebk.txt

rm
myfilebk.txt
y
rm remove myfilebk.txt (yes/no)?

ls
myfile.txt
31
Creating a new subdirectory mkdir (make
directory)

mkdir
images

ls -l
drwx------ images -rwx------ myfile.txt

chmod 755 images
32
Logging out of the system logout

logout
You are now logged out from the Sun Tue Jul 8
112018 HST 2003
Write a Comment
User Comments (0)
About PowerShow.com