Getting started on the unix service
This presentation is the property of its rightful owner.
Sponsored Links
1 / 13

Getting started on the Unix service PowerPoint PPT Presentation


  • 83 Views
  • Uploaded on
  • Presentation posted in: General

Getting started on the Unix service. Zahid Aziz October 2009. Objectives. By the end of the session, participants will: be able to log in to, and off from, the Unix service have an understanding of the Unix filestore be able to move around the filestore, and create, modify and delete files

Download Presentation

Getting started on the Unix service

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Getting started on the unix service

Getting started on the Unix service

Zahid Aziz

October 2009


Objectives

Objectives

By the end of the session, participants will:

  • be able to log in to, and off from, the Unix service

  • have an understanding of the Unix filestore

  • be able to move around the filestore, and create, modify and delete files

  • have an understanding of command options

  • Have an understanding of file permissions


Ssh program provides a text based interface to unix

Ssh program —provides a text-based interface to Unix

  • Text-based means Unix commands have to be typed in

  • Need to know Unix commands and how to issue them

  • Can access Unix host from anywhere over the Internet

  • Programs with a graphical interface can be run on Unix, if an “X-server” is running on the PC


Exceed program

Exceed Program

  • The Exceed program runs an “X-server” on the PC, allowing programs running on the Unix host to produce a graphical interface on the PC.

    ______________________________________

  • On IS Computer Room PCs, SSH and Exceed are available under UoN Software.

  • On your office/own PC, it is preferable to install them locally (see the Software Library)


Unix filestore

/

(root)

/usr

/opt

/home

/...

/home/pcxstudent

/home/eczstaff

/home/pcxstudent/bin

/home/pcxstudent/public_html

/home/pcxstudent/dir1

Unix filestore


Basic commands

Basic commands

  • passwdchange password

  • pwdshow current working directory

  • lslist contents of directory

  • ls -l-l option for longer listing

  • picoeditor to create text file

  • cpcopy file

  • mvmove (rename) file

  • rmremove (delete) file

  • mkdirmake directory

  • cdchange current directory


File permissions

File permissions

  • Types of permission: r, w, x

  • Category of user: user, group, other, all

  • -l option of ls command to display permissions

  • command chmod to change permissions


Displaying file permissions

Displaying file permissions

  • ls-l shows file and directory permissions as well as other information:

    -rw------- 1 cczstaff cc 25 Mar 8 14:47 myfile2drwx------ 2 cczstaff cc 8192 Mar 8 14:47 public_html

  • The first character indicates whether it is a file (-) or a directory (d)

  • Permissions shown by the next 9 characters in 3 groups of 3:

    • Characters 2, 3 and 4 are the permissions for the user

    • Characters 5, 6 and 7 are the permissions for the group

    • Characters 8, 9 and 10 are the permissions for others

  • Within each group of three, the permissions are:

    • rindicating readpermission or– indicatingnoread permission.

    • windicating writepermission or – indicatingnowrite permission.

    • xindicating executepermission or– indicatingnoexecute permission


Changing file permissions

Changing file permissions

  • Users are specified as:

    • u for owner

    • g for owner’s group

    • o for others

    • a for all

  • Permissions are specified as:

    • rfor read access

    • wfor write access

    • xfor execute access

  • Permissions are added or removed from users with

    =to set

    +to add

    -to remove

    e.g.

    chmod o=rx myfile2

    (set read & execute access for others)

    chmod o-x myfile2

    (remove others’ execute access)


Selecting groups of files by pattern matching

Selecting groups of files by pattern matching

  • The * character is used to define a pattern for selecting files and folders whose names match that pattern

  • b* matches all names beginning with b

  • *.txt matches all names ending with .txt

  • Use the echo command to display list of matched names

  • Example of command: cp *.txt green

  • This copies all files with names ending in .txt from current folder to a sub-folder called green


Copying files between unix host and pc

Copying files between Unix host and PC

  • This is done by running an FTP program on the PC end, e.g. SSH FTP Client.

  • Launch FTP and login to Unix host.

  • Shows two windows, one with PC filestore and the other with Unix filestore.

  • Files and folders can be “dragged and dropped” or copied across from one to the other.


Getting started on the unix service

Help

  • Unixmancommand

  • [email protected] ext 16677

    [email protected] ext 16677

  • Getting more out of Unix training sessions


Objectives achieved

Objectives achieved?

  • Can you log in to, and off from, the Unix service?

  • Do you have an understanding of the Unix filestore?

  • Can you move around the filestore, and create, modify and delete files?

  • Do you have an understanding of command options?

  • Do you have an understanding of file permissions?


  • Login