Unix - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

Unix

Description:

Unix. Getting Started in the Unix Environment. Unix Commands. Arcane ... DEL or BACKSPACE deletes previous character CTRL w -- erases previous word ... – PowerPoint PPT presentation

Number of Views:124
Avg rating:3.0/5.0
Slides: 19
Provided by: jst127
Category:
Tags: toman | unix

less

Transcript and Presenter's Notes

Title: Unix


1
Unix
  • Getting Started in the Unix Environment

2
Unix Commands
  • Arcane and Funny looking
  • Counter intuitive
  • Case Sensitive!!
  • FILENAME filename Filename
  • All commands in lowercase

3
General Information
  • The shell we use is called csh
  • favors C programming syntax
  • called C shell

4
Command Syntax
  • Command flags argument1 argument2
  • ls l

5
Correcting Typos
  • ltDELgt or ltBACKSPACEgt deletes previous character
  • ltCTRLgt ltwgt -- erases previous word
  • ltCTRLgt ltugt --erases entire line

6
Files and Directories
  • Pathnames
  • Begin with a forward slash /
  • Example type pwd
  • Returns /home/username
  • This is called your home directory.
  • Home directory is not that same as the system
    root directory. Think of your home directory as
    the very small section of the unix system I call
    my own
  • A / at the end of a URL indicates that the URL
    is pointing to a directory and not a file. By
    default, most servers are configured to display a
    specific file usually called index.html.

7
Naming Directories
  • Usually a single word
  • NO SPACES
  • Lowercase
  • Example create the directory personal using
    mkdir
  • /. Current directory
  • /.. Parent directory

8
Naming Files
  • Filename
  • Extensions
  • Determine the type of the file
  • Examples
  • .txt
  • .html
  • .cgi
  • .gif
  • .jpg
  • Filenames that begin with . are hidden and
    will not appear unless a special directory
    command is used.

9
Online Manual
  • Eight Sections
  • Commands
  • System calls
  • Library functions
  • Devices and device drivers
  • File formats
  • Games
  • Miscellaneous
  • System maintenance

10
Syntax
  • man command
  • Example man cp
  • Example man ls
  • ltCTRLgt ltcgt to exit the manual.

11
Basic Commands
  • passwd changes the users password
  • exit or bye exits the system
  • ls
  • -l lists files in long format
  • -a lists hidden files as non hidden files
  • -c forces a column output
  • -t sorts by last modification time

12
Navagation
  • cat displays the contents of a file
  • cd change directory
  • EXAMPLE cd ..
  • EXAMPLE cd public_html
  • EXAMPLE cd n241
  • EXAMPLE cd ../.
  • WHERE ARE WE?!?!?

13
Copy
  • cp puts a duplicate in another location, leaves
    the original untouched
  • Syntax cp oldfile newfile
  • Copies Files
  • EXAMPLE cp ../../opt/local/examples/test.txt
    helloworld.txt
  • cp helloworld.txt public_html/helloworld.txt
  • cp .txt n241/lectures

14
Move and Remove
  • rm removes files
  • EXAMPLE rm helloworld.txt
  • answer yes to confirm.
  • mv moves files
  • syntax mv oldfile newlocation
  • mv helloworld.txt public_html/n341
  • can also rename files
  • mv helloworld.txt helloworld2.txt

15
Make a Directory/Remove a Directory
  • mkdir - Makes a directory
  • EXAMPLE mkdir funexample
  • cd funexample
  • rmdir removes a directory
  • cd to home/usrename/ if necessary
  • rmdir funexample

16
Permissions
  • Controls who can read write and execute through
    your files.
  • ls l
  • -rw-r--r permissions
  • 1 jstudent owners username
  • students owners group
  • 881- size in bytes
  • Jan 13 1525 time last modified
  • index.html file name

17
Permissions codt
  • Directories usually have 7-5-5 rights
  • Files normally have 7-5-5 rights
  • exception executable files .exe or .cgi
  • we use 6-4-4
  • chmod changes the permissions
  • syntax chmod permission file
  • EXAMPLE chmod 644 index.html
  • chmod 644 . changes permissions of all files in
    a directory.

18
Other Commands
  • finger username gives information about a user
  • cls clears the screen
  • who who is logged into the server at any give
    time
  • cal- calendar of the current month
  • date gives the current system date
  • !! bang bang repeats the last command
  • ! - bang symbol with the number of the last
    command
Write a Comment
User Comments (0)
About PowerShow.com