INLS461 UNIX - PowerPoint PPT Presentation

1 / 29
About This Presentation
Title:

INLS461 UNIX

Description:

Navigate, create and remove directories (cd, mkdir , rmdir) Move and delete a file (mv, rm) ... Remove directory executed at the root can wipe out one's entire system. ... – PowerPoint PPT presentation

Number of Views:22
Avg rating:3.0/5.0
Slides: 30
Provided by: ils93
Category:
Tags: unix | inls461 | wipeout

less

Transcript and Presenter's Notes

Title: INLS461 UNIX


1
INLS461UNIX
  • Scott Adams

2
Objectives
  • By the end of this week you should be able to
  • Describe the underlying structure of UNIX
  • Recognize the typical UNIX structure
  • Log into UNIX
  • Navigate, create and remove directories (cd,
    mkdir , rmdir)
  • Move and delete a file (mv, rm)
  • Use the UNIX commands to see parts of a file
    (cat, more, head, and tail)

3
UNIX vs PC
  • UNIX is the first choice for
  • High end storage and processing such as
    scientific computing
  • Hosting websites
  • PC is the first choice for
  • Desktop publishing
  • Low end processing power
  • Command line interfaces
  • Typically a high learning curve and low retention
  • Post learning faster because your hands dont
    leave the keyboard

4
UNIX
  • UNIX
  • an operating system
  • Designed at ATT's Bell Laboratories
  • Introduced in 1969
  • Linux (Linus Unix)
  • an open source variant of UNIX
  • 1991, a student named Linus Torwalds from Finland

5
History
6
ShellHistory
7
UNIX Underlying Structure
  • UNIX operating system consist of 3 main parts
  • Kernel (system)
  • Shell (interface)
  • Program (applications)
  • UNIX uses a command line interface
  • All commands in UNIX are CASE SENSITIVE
  • spaces matter
  • Most commands are one word with optional
    modifying flags or arguments ie command -option
    argument
  • Directory file names up to 256 characters long
  • UNIX is a hierarchy of directories, structured as
    an inverted tree.

8
(No Transcript)
9
(No Transcript)
10
Accessing UNIX via Telnet
  • Via Secure Shell, telnet, or command prompt.
  • Enter host name (isis.unc.edu), login (onyen)
    password. Hit connect for prompt

11
Accessing UNIX via FTP
12
Session Properties
isis.unc.edu
13
Transfer
14
Class exercise
  • Create a file on your PC called Test1.txt
  • Save onto the desktop
  • Login into your isis via telnet
  • Transfer Test1.txt to the public_html folder
  • You can see the file by typing cat Test1.txt
  • Rename the file to Test2.txt and change the text
  • Transfer the file using WS_FTP

15
Basic Navigation
  • Use ls to LIST files within a directory.
  • Use cd to CHANGE DIRECTORY or move among
    subdirectories.
  • Verify current location with pwd.

16
CD (Change Directory)
  • cd .. moves you up one directory level.
  • cd ../.. moves you up two directory levels.
  • cd SubdirectoryName moves you to the specified
    directory. E.g. cd public_html
  • cd alone returns you to your Home directory.

17
Simplest ls command, all files on current
directory in columns. Can use wild card ls l
to list only files starting with a certain letter.
18
Intermediate ls l includes file permissions,
size, date created
19
Fullest ls al includes hidden files
20
pwd (print working directory) displays current
directory path
21
Modifying Directories
  • mkdir creates a new directory
  • mkdir SubdirectoryName creates a directory within
    the current directory.
  • rm FileName removes the specified file
  • rmdir removes an empty directory
  • rm r deletes a directory and all files.

22
Warning UNIX Can Be Deceptively Powerful
  • Remove directory executed at the root can wipe
    out ones entire system. The web abounds with
    UNIX horror stories http//www.zorg.org/unixhumou
    r/unix.admin.horror..html

23
Copying Renaming Files
  • cp command copies a file or directory.
  • mv command moves or renames a file or directory.
  • rm command deletes a file or directory.

24
For Help, Use man (manual) command
25
Creating Text Files
  • Type cat gtFileName
  • hit enter
  • enter text
  • save with control-D
  • Type Echo text gt filename.txt

26
Finding parts of files
  • To see the entire file use the cat command
  • Cat ltfilenamegt
  • Try cat myfiles.txt
  • If the text goes too fast pipe to more
  • Eg cat ltfilenamegt more
  • (more on piping next week)
  • To see the first (last) 10 lines use head (tail)
  • Eg head ltfilenamegt

27
Summary Basic Commands
  • display the current directory type pwd (print
    working directory)
  • cd (change directory)
  • display the directory list ls (ls -l or ls -a or
    ls -al)
  • copy cp
  • Move mv
  • Delete rm
  • Rename mv
  • mkdir (make directory)
  • rmdir (remove directory)
  • Cat, more, head, tail
  • Man (help command)

28
Class Exercise
  • Log into UNIX using telnet
  • Repeat the steps required to create a file that
    contains your directory structure
  • Explore the typical unix file structure that we
    discussed last week

29
Acknowledgements
  • All slides used in this class have been modified
    from previous versions of INLS102
  • UNIX Images from Sarwar, Koretsky, and Sarwar
    UNIX The Textbook 2nd Edition (2005) Pearson
    Addison-Wesley
Write a Comment
User Comments (0)
About PowerShow.com