1 / 13

Getting started on the Unix service

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

teo
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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Getting started on the Unix service Zahid Aziz October 2009

  2. 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

  3. 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

  4. 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)

  5. / (root) /usr /opt /home /... /home/pcxstudent /home/eczstaff /home/pcxstudent/bin /home/pcxstudent/public_html /home/pcxstudent/dir1 Unix filestore

  6. Basic commands • passwd change password • pwd show current working directory • ls list contents of directory • ls -l -l option for longer listing • pico editor to create text file • cp copy file • mv move (rename) file • rm remove (delete) file • mkdir make directory • cd change current directory

  7. 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

  8. Displaying file permissions • ls-l shows file and directory permissions as well as other information: -rw------- 1 cczstaff cc 25 Mar 8 14:47 myfile2 drwx------ 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. • w indicating writepermission or – indicatingnowrite permission. • xindicating executepermission or – indicatingnoexecute permission

  9. 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: • r for read access • w for write access • x for 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)

  10. 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

  11. 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.

  12. Help • Unixmancommand • student-IT-helpline@nottingham.ac.uk ext 16677 staff-IT-helpline@nottingham.ac.uk ext 16677 • Getting more out of Unix training sessions

  13. 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?

More Related