These exercises are to help you to become familiar with directory and file management.

Size: px
Start display at page:

Download "These exercises are to help you to become familiar with directory and file management."

Transcription

1 INFO230 - UNIX PRACTICAL EXERCISE INTRODUCTION TO THE WORKSTATION The workstation environment is one you will be using to do your work. This project unit is designed to help you to become familiarised with that environment. This includes how the windowing system works and can be customised, how to use the various unix commands, the unix C shell environment and an appreciation of the networking capabilities. 1.2 Exercises Workstation appearance When you start up you should also see a help viewer window which introduces and explains the CDE (Common Desktop Environment). Read through some of the introductory material there about windows, logging in and out, screen appearance, the mouse, keyboard etc. THE CDE has a set of control menus accessed by buttons in the front panel at the bottom of the screen. Its appearance, in descriptive form, is as follows: File manager Personal apps Mailer Printers Style manager Calandar Clock Netstation apps Work space Exit Application manager Help Trash can Using the style manager to configure the following according to your own preferences: 1. Select a suitable colour scheme for windows, menus etc. 2. Choose a back-drop. 3. Choose a screen saver. 4. Choose whether you want right- or left-handed mouse operation. Starting applications Find and practice starting up the following applications: 1. Netscape 2. The mailer - practice sending yourself or to a friend a mail message 3. Find how to start up the digital clock (you may need to search through a few menus to do that) 4. Practice creating some new terminal (dterm) windows. - Practice moving, iconing and closing these windows. UP.1

2 Moving between workspaces There are 4 workspaces you can work in. Create a new dterm and practice moving that window between different workspaces. e.g. Create the window initially in workspace 1, then move it to workspace 3, then to workspace 4 and then back to workspace INTRODUCTION TO UNIX These exercises are to help you to become familiar with directory and file management Introductory exercises 1. Make a directory in your home directory called practice. It will be used to do the exercises in this project unit. Change directories so this is your current directory. 2. Verify the path by using the pwd command. 3. Copy the file /usr1/student/info230/work.tar into this directory. It contains files and subdirectories in archive format that you will need to do the exercises. 4. Execute the command below to expand the archive you just copied. (the % sign is a general symbol that is used to refer to the command line prompt and should not be typed) % tar xf work.tar 5. Examine the files and directories using the ls command. 6. List the contents of subdirectories using the ls -R command. 7. Change your current directory to prac1. 8. Are there any hidden files inside prac1? 9. How large these files? 10. Use the file manager to examine your home directory and the files you just copied and created Directory creation and deletion 1. Make a directory inside prac1 called temp 2. Create its existence and contents in directory prac1 using ls 3. Now copy the file a.c into temp 4. Try to remove the directory using the rmdir command. 5. Enter the temp directory, remove the file a.c and return to prac1 6. Now remove the directory temp UP.2

3 1. 6 Filename expansion Filename expansion is used as a general technique and not just for use with the ls of cp commands. With ~/practice/prac1 as your current directory examine the operation of the following commands: % echo * % echo *.c % echo *.* % echo chapt? % echo chapt[123] % echo chapt[123456] % echo chapt[1-3] % echo chapt[1-6] % echo help{a,b,c}.doc wc, cat, more and sort commands 1. Display the contents of the file fruit and veg using the cat command. 2. Use the wc command to show how many lines, words and characters are in these files. 3. fruit and veg are not sorted. Use the sort command to sort both of these files in increasing alphabetical order. 4. Combine the fruit and veg files as follows % cat fruit veg > produce (This uses output redirection to redirect the output of the cat fruit veg from the screen to the file produce. 5. Display this file using the more command. % more produce 6. Sort this file in reverse alphabetic order and display it by piping it into more % sort -r produce more 7. Display the first 10 lines and then the last 10 lines of produces as follows: % head produce % tail produce 8. How would you display the first 15 lines? UP.3

4 1. 8 INTRODUCTION TO SHELL SCRIPTS Since we have not yet cover vi, use the text editor to create the following scripts in the directory ~/practice/prac1. The text editor has not been covered in lectures but it is a simple easy-to-use text editor using a graphical interface Shell variables and echo Create the following script story!/bin/csh echo It was a dark and stormy night echo Jack and Jill went up the hill echo Suddenly a shot rang out echo Jack fell down and broke his crown echo And Jill came tumbling after WARNING: Do not forget to put a CARRIAGE RETURN after the last line of the script. If you do not, it is incomplete and will be not be interpreted. This applies to all scripts that you create. 1. Run this script by typing % chmod u+x story % story 2. Now run this script by typing % source story 3. Copy this script into the file story2 and modify it so that Jack and Jill are replaced by two shell variables $char1 and $char2 contained in the script. Test this script by typing 1.10 % story2 To examine more of the power of shell scripts, create the following script: welcome!/bin/csh echo Hello $user echo Today is `date` echo I feel $argv[1] today echo The following users are logged in: `users` UP.4

5 1. Test the script by typing: % chmod u+x welcome % welcome good 2. Look up the lecture notes to explain what: (i) $user does in line 3 (ii) `date` does in line 4 (iii) $argv[1] does in line 5 (iv) `users` does in line 6 3. What will happen if you were to try to execute the script as follows? % source welcome good INFO230 - UNIX PRACTICAL EXERCISE 2 For the second week s exercise, make ~/practice/prac2 your current directory 2. 1 Shell variables and lists This section of the work examines the differences in how words are grouped. Create the following script: shellwords!/bin/csh set a1 = One two three set a2 = One two three set a3 = One two three set a4 = (One two three) set a5 = ($a2) set a6 = $a2 $a3 set a7 = ($a2 $a3) echo $a1 $a1 echo $a2 $a2 echo $a3 $a3 echo $a4 $a4 echo $a5 $a5 echo $a6 $a6 echo $a7 $a7 echo $a7[2] 1. What does echo $a1 $a1 do? UP.5

6 2. Test the script and note the difference in the way quoting and grouping affects the contents and number of words considered in the shell variables. 3. Which shell variable has the most number of words? 4. Which shell variables have one word and include spaces in the word? 2. 2 if-then expression Create the following script: checkpattern pattern!/bin/csh if ($argv!= 1) then echo "Usage: checkpattern1 pattern" exit 1 endif if ($argv[1] == abc) then echo "Pattern $argv[1] recognised" else echo "Pattern $argv[1] not recognised" endif Note: spaces must appear before and after the!= and == in the if expression. This script checks if the command line argument pattern matches an internally stored string ( abc in this instance). 1. Test the script using different patterns. 2. Check the argument checking by putting in badly formatted command lines (i.e. 0 or 2 or more command line arguments) 2. 3 prepend script The following script reads input from stdin and places it at the front of a file (prepends it) prepend filename!/bin/csh append stdin to a file usage: prepend filename set tf = /tmp/ppd.$$ set dest = $argv[1] cat - $dest > $tf mv $tf $dest WARNING: Do not forget to put in a CARRIAGE RETURN after the last line of the script. UP.6

7 The directory /tmp is a system directory which all users may access to store temporary files. /tmp is cleaned out regularly (once a week) so do not leave important files there. 1. What is the shell variable $$? 2. Is the file name $tf created unique? Why would we want create a file name this way? 3. Create a temporary file called temp1 and type in a few lines of text (it doesn t matter what it is). Now type: % prepend temp CTRL-D % more temp1 The contents of the file temp1 should now have etc at the front of the file. Examine the line in the script % cat - $dest > $tf How is this command used to do the prepend operation? 4. Pipes can be used to pass the output of one command to the input of another command. prepend takes its input from stdin. Instead of the keyboard we can use a pipe to take the input to prepend from another command e.g. ls. Try this command % ls prepend temp1 Explain how this command works Compressing files and directories You may find it necessary to reduce the amount of disk space you are using since you are running out of disk quota. One way to reduce space is to archive and compress files. 1. In the practice/prac2 directory is a directory called backup. You see that it contains several subdirectories and files. 2. Type %du backup to see how much space it occupies (roughly). 3. Create an archive of backup and its files and subdirectories by typing % tar cfv backup.tar backup UP.7

8 4. Now compress the archive using % compress backup.tar The file backup.tar.z has now been created. 5. Use ls -l to look at how much space it occupies. Compare this with the value from before. 6. Delete the backup directory and its contents (what is a simple and quick way of doing this?) 7. Restore the backup directory by first uncompressing it: % uncompress backup.tar.z 8. Expand the archive by doing: % tar xf backup.tar to restore the backup directory. tar cfv compress backup backup.tar backup.tar.z backup tar xfv backup.tar uncompress 2. 5 Introduction to vi The file practice.vi in ~/practice/prac2 contains a tutorial on using vi. The file contains information on some of the basic commands needed to work with vi and instructions and exercises to help you to learn how to use them. Begin the exercise by entering an editing session with vi as follows: % vi practice.vi and following the instructions in the file. If you get confused and you cannot recover, exit from practice.vi using :q! and start again. If things get really bad, exit using :q! and copy practice.vi.bak and start afresh. UP.8

9 INFO230 - UNIX PRACTICAL EXERCISE 3 For the third week s exercise, make ~/practice/prac3 your current directory. 3.1 Subshells Commands separated by a semi-colon (;) are executed one after the other. Commands enclosed in parenthesis () are executed in a subshell. Execute the following two commands. % ls; date > out1 % (ls; date) > out2 By examining the screen output and the contents of the two files: out1 and out2, explain the difference between the two commands in terms of unix shell execution Conditional execution Copy the fruit file from../prac1 into the current directory. Execute the commands: % grep paper fruit % grep apple fruit Which of these commands did not succeed? The operation is used to execute the second command if the first wasn t successful, and the && is used to execute the second command if the first was successful. Enter the command and examine the output. % grep paper fruit echo Paper not found % grep apple fruit && echo apple found What would happen in the following commands? % grep paper fruit && echo Paper not found % grep apple fruit echo apple found 3. 3 Background execution and job control Execute the following command % du / >& /dev/null & This checks the whole file system and takes a long time, so it should be done in the background. 1. Look up the du command in the man pages. 2. What does >& do? (N.B. that /dev/null is the null device and all output redirected there disappears). UP.9

10 3. The final & means that this command is run as a background process. Examine the list of background jobs using the jobs command after. 4. Now bring that job into the foreground using the fg command. 5. Interrupt execution of the job by typing CTRL-Z. 6. Examine the job list again. 7. Now resume background operation using the bg command. 8. Finally kill the job using the kill command foreach expression Create the following script which lists the size of all non-zero size files (not directories in the current directory). listsize!/bin/csh foreach file (*) if (-f $file &&! -z $file) then set a = `ls -l $file` echo $file $a[5] endif end 1. Test the script by making it executable and running it. To help you create files of zero size for testing this script, there is a program called makezero in the directory which will create a file called zero of size. You can create other zero-size files by copying and renaming the file zero. 2. Carefully examine the script so that you understand what each line is doing. Test your understanding with the following questions: 2.1 What does the following line do? foreach file (*) 2.2 What does the following line do? if (-f $file &&! -z $file) then 2.3 What does the following line do? set a = `ls -l $file` UP.10

11 2.4 What does the following line do? (hint: do an ls -l command on the terminal, why do we echo $a[5]?) echo $file $a[5] 3. 5 Numeric operations Create the following script which counts up to a limit which is specified as a command line argument. count limit!/bin/csh Example usage: count 5 if ($argv!= 1) then echo "Usage: count limit" exit 1 endif if ($argv[1] <= 0) then echo "Limit must be positive" exit 1 endif set i = 1 while (1) echo i = $i + 1 if ($i > $argv[1]) exit end Note: It is important to have a space between and the name of the shell script variable. 1. Test the script by trying different command lines (correctly formatted and not). 2. Carefully examine the script so that you understand what each line is doing. 3. Modify the script so that it has a second argument so that it counts down from limit to when it goes below zero in multiple of the second argument Script execution Scripts can be executed in one of two ways. They can be executed in the current shell using the source command or you can run them in a subshell by changing their file permissions and running them directly like any other command in unix. We will examine the differences here. Create the following script setalias (using the vi editor if you know how). UP.11

12 setalias!/bin/csh set abc = "One two three" echo $abc alias la `ls -a` alias la When the source command is used to execute a script, shell variables and aliases generated by the script do not appear after execution of the script. When direct execution command is used to execute a script, shell variables and aliases will be lost because these variables and alises cannot be passed from a subshell process to a parent process. Make the script executable by doing % chmod u+x setalias 1. Remove any existing shell variables and alises with the same names as used in the shell script. % unset abc % unalias la 2. Now execute the command % source setalias Examine the list of aliases and set variables again. The alias la and abc shell variables should be present. 3. Remove references to abc and la again by doing: % unset abc % unalias la 4. Execute the script as follows: % setalias The shell variable abc and alias la should not be present since they could not be passed back to the parent process. UP.12

13 Unix/C Shell Programming Assign. on Mac INFO230 - UNIX ASSIGNMENT This assignment is due one week after the completion of the third Unix practical session. The unix project assignment is marked out of 100. Make a directory called unix_assign in your home directory and store all your unix assignment files in that directory. Question 1 (xstory name1 name2) (10 marks) Copy the script story2 from the practical exercise 1 to the file xstory and modify it so that Jack and Jill are replaced by two command line arguments ($argv[1] and $argv[2]). The script can then be tested as follows: % xstory Bart Homer Question 2 (loggedin user) (15 marks) Create a script called loggedin which checks to see if a particular user is logged in. It has a single argument and produces one of the two messages, depending on whether the user indicated is logged in at this moment. % loggedin s s is not logged in % loggedin s s is logged in Question 3 (sfind filename c) (15 marks) Create a script called sfind that has two input arguments filename and c. It searches through the file called filename and prints out in increasing alphabetical order all lines beginning with the letter given by the argument c. For example: % sfind fruit p passionfruit peach plum Question 4 (quote) (20 marks) Quoting and the use of escape characters take a bit of practice because of the order in which the C shell processes a command and the different types of quotes. In this assignment question you are to create a script called quote which produces the following messages (use the echo command to produce each line): (n.b. all five (5) lines are to be included below, also, pay particular attention to the exact characters used; especially note lines 3 and 5 regarding quotes and slashes). UA.1

14 Unix/C Shell Programming Assign. on Mac Alice & Wally s Cafe!!^ Welcome ^!! Hot dog s $1.50 Coke\~Pepsi $1.30 *** `All you can eat` *** Question 5 (listexec suffix) (15 marks) Modify the listsize script in the practical exercise 3 to create a script called listexec that (i) (ii) uses the while statement instead of the foreach statement it lists the size of any files with executable permission whose suffix matches a particular pattern. For example: % listexec uu a.uu 256 bett.uu 3456 z1.uu 123 Question 6 (fileman) (25 marks) You are to write a C script, called fileman, that will be used to manage files by allowing them to be copied, moved or deleted with interactive input from the user. It has the following three possible command usage formats: fileman -c filenames fileman -m filenames fileman -r filenames where filenames is a list of one or more file names. The command line options are as follows: -c This is used to copy each file in the list of file names specified in the command line. For each file to be copied the script will prompt the user for the name of the new file. -m This is used to rename (move) each file in the list of file names specified in the command line. For each file the script will prompt the user for the new name of the file. -r This is used to remove each file in the list of file names specified in the command line. The user is prompted for confirmation before a file is removed. Write the script so that it will correctly interpret the command line options and arguments to perform the functions associated with each option. Your script should check for invalid command lines and, if an error occurs, print out a message showing the correct usage formats. UA.2

Cisco Networking Academy Program Curriculum Scope & Sequence. Fundamentals of UNIX version 2.0 (July, 2002)

Cisco Networking Academy Program Curriculum Scope & Sequence. Fundamentals of UNIX version 2.0 (July, 2002) Cisco Networking Academy Program Curriculum Scope & Sequence Fundamentals of UNIX version 2.0 (July, 2002) Course Description: Fundamentals of UNIX teaches you how to use the UNIX operating system and

More information

Introduction to Mac OS X

Introduction to Mac OS X Introduction to Mac OS X The Mac OS X operating system both a graphical user interface and a command line interface. We will see how to use both to our advantage. Using DOCK The dock on Mac OS X is the

More information

A Crash Course on UNIX

A Crash Course on UNIX A Crash Course on UNIX UNIX is an "operating system". Interface between user and data stored on computer. A Windows-style interface is not required. Many flavors of UNIX (and windows interfaces). Solaris,

More information

Thirty Useful Unix Commands

Thirty Useful Unix Commands Leaflet U5 Thirty Useful Unix Commands Last revised April 1997 This leaflet contains basic information on thirty of the most frequently used Unix Commands. It is intended for Unix beginners who need a

More information

Tutorial 0A Programming on the command line

Tutorial 0A Programming on the command line Tutorial 0A Programming on the command line Operating systems User Software Program 1 Program 2 Program n Operating System Hardware CPU Memory Disk Screen Keyboard Mouse 2 Operating systems Microsoft Apple

More information

HP-UX Essentials and Shell Programming Course Summary

HP-UX Essentials and Shell Programming Course Summary Contact Us: (616) 875-4060 HP-UX Essentials and Shell Programming Course Summary Length: 5 Days Prerequisite: Basic computer skills Recommendation Statement: Student should be able to use a computer monitor,

More information

Basic C Shell. helpdesk@stat.rice.edu. 11th August 2003

Basic C Shell. helpdesk@stat.rice.edu. 11th August 2003 Basic C Shell helpdesk@stat.rice.edu 11th August 2003 This is a very brief guide to how to use cshell to speed up your use of Unix commands. Googling C Shell Tutorial can lead you to more detailed information.

More information

Hands-On UNIX Exercise:

Hands-On UNIX Exercise: Hands-On UNIX Exercise: This exercise takes you around some of the features of the shell. Even if you don't need to use them all straight away, it's very useful to be aware of them and to know how to deal

More information

Tutorial Guide to the IS Unix Service

Tutorial Guide to the IS Unix Service Tutorial Guide to the IS Unix Service The aim of this guide is to help people to start using the facilities available on the Unix and Linux servers managed by Information Services. It refers in particular

More information

Introduction to the UNIX Operating System and Open Windows Desktop Environment

Introduction to the UNIX Operating System and Open Windows Desktop Environment Introduction to the UNIX Operating System and Open Windows Desktop Environment Welcome to the Unix world! And welcome to the Unity300. As you may have already noticed, there are three Sun Microsystems

More information

Introduction to Shell Programming

Introduction to Shell Programming Introduction to Shell Programming what is shell programming? about cygwin review of basic UNIX TM pipelines of commands about shell scripts some new commands variables parameters and shift command substitution

More information

An Introduction to the Linux Command Shell For Beginners

An Introduction to the Linux Command Shell For Beginners An Introduction to the Linux Command Shell For Beginners Presented by: Victor Gedris In Co-Operation With: The Ottawa Canada Linux Users Group and ExitCertified Copyright and Redistribution This manual

More information

Birmingham Environment for Academic Research. Introduction to Linux Quick Reference Guide. Research Computing Team V1.0

Birmingham Environment for Academic Research. Introduction to Linux Quick Reference Guide. Research Computing Team V1.0 Birmingham Environment for Academic Research Introduction to Linux Quick Reference Guide Research Computing Team V1.0 Contents The Basics... 4 Directory / File Permissions... 5 Process Management... 6

More information

Unix Guide. Logo Reproduction. School of Computing & Information Systems. Colours red and black on white backgroun

Unix Guide. Logo Reproduction. School of Computing & Information Systems. Colours red and black on white backgroun Logo Reproduction Colours red and black on white backgroun School of Computing & Information Systems Unix Guide Mono positive black on white background 2013 Mono negative white only out of any colou 2

More information

Unix Shell Scripts. Contents. 1 Introduction. Norman Matloff. July 30, 2008. 1 Introduction 1. 2 Invoking Shell Scripts 2

Unix Shell Scripts. Contents. 1 Introduction. Norman Matloff. July 30, 2008. 1 Introduction 1. 2 Invoking Shell Scripts 2 Unix Shell Scripts Norman Matloff July 30, 2008 Contents 1 Introduction 1 2 Invoking Shell Scripts 2 2.1 Direct Interpretation....................................... 2 2.2 Indirect Interpretation......................................

More information

Linux command line. An introduction to the Linux command line for genomics. Susan Fairley

Linux command line. An introduction to the Linux command line for genomics. Susan Fairley Linux command line An introduction to the Linux command line for genomics Susan Fairley Aims Introduce the command line Provide an awareness of basic functionality Illustrate with some examples Provide

More information

Unix the Bare Minimum

Unix the Bare Minimum Unix the Bare Minimum Norman Matloff September 27, 2005 c 2001-2005, N.S. Matloff Contents 1 Purpose 2 2 Shells 2 3 Files and Directories 4 3.1 Creating Directories.......................................

More information

LECTURE-7. Introduction to DOS. Introduction to UNIX/LINUX OS. Introduction to Windows. Topics:

LECTURE-7. Introduction to DOS. Introduction to UNIX/LINUX OS. Introduction to Windows. Topics: Topics: LECTURE-7 Introduction to DOS. Introduction to UNIX/LINUX OS. Introduction to Windows. BASIC INTRODUCTION TO DOS OPERATING SYSTEM DISK OPERATING SYSTEM (DOS) In the 1980s or early 1990s, the operating

More information

UNIX Tutorial for Beginners

UNIX Tutorial for Beginners UNIX Tutorial for Beginners Typographical conventions In what follows, we shall use the following typographical conventions: Characters written in bold typewriter font are commands to be typed into the

More information

Command Line - Part 1

Command Line - Part 1 Command Line - Part 1 STAT 133 Gaston Sanchez Department of Statistics, UC Berkeley gastonsanchez.com github.com/gastonstat Course web: gastonsanchez.com/teaching/stat133 GUIs 2 Graphical User Interfaces

More information

Unix Sampler. PEOPLE whoami id who

Unix Sampler. PEOPLE whoami id who Unix Sampler PEOPLE whoami id who finger username hostname grep pattern /etc/passwd Learn about yourself. See who is logged on Find out about the person who has an account called username on this host

More information

Integrated Accounting System for Mac OS X

Integrated Accounting System for Mac OS X Integrated Accounting System for Mac OS X Program version: 6.3 110401 2011 HansaWorld Ireland Limited, Dublin, Ireland Preface Standard Accounts is a powerful accounting system for Mac OS X. Text in square

More information

USEFUL UNIX COMMANDS

USEFUL UNIX COMMANDS cancel cat file USEFUL UNIX COMMANDS cancel print requested with lp Display the file cat file1 file2 > files Combine file1 and file2 into files cat file1 >> file2 chgrp [options] newgroup files Append

More information

Fundamentals of UNIX Lab 16.2.6 Networking Commands (Estimated time: 45 min.)

Fundamentals of UNIX Lab 16.2.6 Networking Commands (Estimated time: 45 min.) Fundamentals of UNIX Lab 16.2.6 Networking Commands (Estimated time: 45 min.) Objectives: Develop an understanding of UNIX and TCP/IP networking commands Ping another TCP/IP host Use traceroute to check

More information

BIGPOND ONLINE STORAGE USER GUIDE Issue 1.1.0-18 August 2005

BIGPOND ONLINE STORAGE USER GUIDE Issue 1.1.0-18 August 2005 BIGPOND ONLINE STORAGE USER GUIDE Issue 1.1.0-18 August 2005 PLEASE NOTE: The contents of this publication, and any associated documentation provided to you, must not be disclosed to any third party without

More information

The Linux Operating System and Linux-Related Issues

The Linux Operating System and Linux-Related Issues Review Questions: The Linux Operating System and Linux-Related Issues 1. Explain what is meant by the term copyleft. 2. In what ways is the Linux operating system superior to the UNIX operating system

More information

CS 103 Lab Linux and Virtual Machines

CS 103 Lab Linux and Virtual Machines 1 Introduction In this lab you will login to your Linux VM and write your first C/C++ program, compile it, and then execute it. 2 What you will learn In this lab you will learn the basic commands and navigation

More information

Lab 1: Introduction to C, ASCII ART and the Linux Command Line Environment

Lab 1: Introduction to C, ASCII ART and the Linux Command Line Environment .i.-' `-. i..' `/ \' _`.,-../ o o \.' ` ( / \ ) \\\ (_.'.'"`.`._) /// \\`._(..: :..)_.'// \`. \.:-:. /.'/ `-i-->..

More information

UNIX, Shell Scripting and Perl Introduction

UNIX, Shell Scripting and Perl Introduction UNIX, Shell Scripting and Perl Introduction Bart Zeydel 2003 Some useful commands grep searches files for a string. Useful for looking for errors in CAD tool output files. Usage: grep error * (looks for

More information

Command Line Crash Course For Unix

Command Line Crash Course For Unix Command Line Crash Course For Unix Controlling Your Computer From The Terminal Zed A. Shaw December 2011 Introduction How To Use This Course You cannot learn to do this from videos alone. You can learn

More information

A UNIX/Linux in a nutshell

A UNIX/Linux in a nutshell bergman p.1/23 A UNIX/Linux in a nutshell Introduction Linux/UNIX Tommi Bergman tommi.bergman[at]csc.fi Computational Environment & Application CSC IT center for science Ltd. Espoo, Finland bergman p.2/23

More information

University of Toronto

University of Toronto 1 University of Toronto APS 105 Computer Fundamentals A Tutorial about UNIX Basics Fall 2011 I. INTRODUCTION This document serves as your introduction to the computers we will be using in this course.

More information

DiskPulse DISK CHANGE MONITOR

DiskPulse DISK CHANGE MONITOR DiskPulse DISK CHANGE MONITOR User Manual Version 7.9 Oct 2015 www.diskpulse.com info@flexense.com 1 1 DiskPulse Overview...3 2 DiskPulse Product Versions...5 3 Using Desktop Product Version...6 3.1 Product

More information

Linux System Administration on Red Hat

Linux System Administration on Red Hat Linux System Administration on Red Hat Kenneth Ingham September 29, 2009 1 Course overview This class is for people who are familiar with Linux or Unix systems as a user (i.e., they know file manipulation,

More information

PMOD Installation on Linux Systems

PMOD Installation on Linux Systems User's Guide PMOD Installation on Linux Systems Version 3.7 PMOD Technologies Linux Installation The installation for all types of PMOD systems starts with the software extraction from the installation

More information

Cygwin command line windows. Get that Linux feeling - on Windows http://cygwin.com/

Cygwin command line windows. Get that Linux feeling - on Windows http://cygwin.com/ Cygwin command line windows Get that Linux feeling - on Windows http://cygwin.com/ 1 Outline 1. What is Cygwin? 2. Why learn it? 3. The basic commands 4. Combining commands in scripts 5. How to get more

More information

CMSC 216 UNIX tutorial Fall 2010

CMSC 216 UNIX tutorial Fall 2010 CMSC 216 UNIX tutorial Fall 2010 Larry Herman Jandelyn Plane Gwen Kaye August 28, 2010 Contents 1 Introduction 2 2 Getting started 3 2.1 Logging in........................................... 3 2.2 Logging

More information

Introduction to Linux and Cluster Basics for the CCR General Computing Cluster

Introduction to Linux and Cluster Basics for the CCR General Computing Cluster Introduction to Linux and Cluster Basics for the CCR General Computing Cluster Cynthia Cornelius Center for Computational Research University at Buffalo, SUNY 701 Ellicott St Buffalo, NY 14203 Phone: 716-881-8959

More information

Linux Overview. Local facilities. Linux commands. The vi (gvim) editor

Linux Overview. Local facilities. Linux commands. The vi (gvim) editor Linux Overview Local facilities Linux commands The vi (gvim) editor MobiLan This system consists of a number of laptop computers (Windows) connected to a wireless Local Area Network. You need to be careful

More information

Shell Scripts (1) For example: #!/bin/sh If they do not, the user's current shell will be used. Any Unix command can go in a shell script

Shell Scripts (1) For example: #!/bin/sh If they do not, the user's current shell will be used. Any Unix command can go in a shell script Shell Programming Shell Scripts (1) Basically, a shell script is a text file with Unix commands in it. Shell scripts usually begin with a #! and a shell name For example: #!/bin/sh If they do not, the

More information

Getting Started with Command Prompts

Getting Started with Command Prompts Getting Started with Command Prompts Updated March, 2013 Some courses such as TeenCoder : Java Programming will ask the student to perform tasks from a command prompt (Windows) or Terminal window (Mac

More information

AN INTRODUCTION TO UNIX

AN INTRODUCTION TO UNIX AN INTRODUCTION TO UNIX Paul Johnson School of Mathematics September 24, 2010 OUTLINE 1 SHELL SCRIPTS Shells 2 COMMAND LINE Command Line Input/Output 3 JOBS Processes Job Control 4 NETWORKING Working From

More information

Lab 1: Introduction to the network lab

Lab 1: Introduction to the network lab CSCI 312 - DATA COMMUNICATIONS AND NETWORKS FALL, 2014 Lab 1: Introduction to the network lab NOTE: Be sure to bring a flash drive to the lab; you will need it to save your data. For this and future labs,

More information

The latest update can be found on the Bruker FTP servers:

The latest update can be found on the Bruker FTP servers: This manual describes features of the X-windows environment on SGI and Aspect Station I. Functions of the SGI toolchest are described as well as several ways to set up your personal X-environment. For

More information

Attix5 Pro Server Edition

Attix5 Pro Server Edition Attix5 Pro Server Edition V7.0.3 User Manual for Linux and Unix operating systems Your guide to protecting data with Attix5 Pro Server Edition. Copyright notice and proprietary information All rights reserved.

More information

Command-Line Operations : The Shell. Don't fear the command line...

Command-Line Operations : The Shell. Don't fear the command line... Command-Line Operations : The Shell Don't fear the command line... Shell Graphical User Interface (GUI) Graphical User Interface : displays to interact with the computer - Open and manipulate files and

More information

Lecture 4: Writing shell scripts

Lecture 4: Writing shell scripts Handout 5 06/03/03 1 Your rst shell script Lecture 4: Writing shell scripts Shell scripts are nothing other than les that contain shell commands that are run when you type the le at the command line. That

More information

Bash shell programming Part II Control statements

Bash shell programming Part II Control statements Bash shell programming Part II Control statements Deniz Savas and Michael Griffiths 2005-2011 Corporate Information and Computing Services The University of Sheffield Email M.Griffiths@sheffield.ac.uk

More information

Introduction to. UNIX Bob Booth December 2004 AP-UNIX2. University of Sheffield

Introduction to. UNIX Bob Booth December 2004 AP-UNIX2. University of Sheffield Introduction to UNIX Bob Booth December 2004 AP-UNIX2 University of Sheffield Contents 1. INTRODUCTION... 3 1.1 THE SHELL... 3 1.2 FORMAT OF COMMANDS... 4 1.3 ENTERING COMMANDS... 4 2. ACCESSING UNIX MACHINES...

More information

CS2043 - Unix Tools & Scripting Lecture 9 Shell Scripting

CS2043 - Unix Tools & Scripting Lecture 9 Shell Scripting CS2043 - Unix Tools & Scripting Lecture 9 Shell Scripting Spring 2015 1 February 9, 2015 1 based on slides by Hussam Abu-Libdeh, Bruno Abrahao and David Slater over the years Announcements Coursework adjustments

More information

CS10110 Introduction to personal computer equipment

CS10110 Introduction to personal computer equipment CS10110 Introduction to personal computer equipment PRACTICAL 4 : Process, Task and Application Management In this practical you will: Use Unix shell commands to find out about the processes the operating

More information

UNIX / Linux commands Basic level. Magali COTTEVIEILLE - September 2009

UNIX / Linux commands Basic level. Magali COTTEVIEILLE - September 2009 UNIX / Linux commands Basic level Magali COTTEVIEILLE - September 2009 What is Linux? Linux is a UNIX system Free Open source Developped in 1991 by Linus Torvalds There are several Linux distributions:

More information

Fred Hantelmann LINUX. Start-up Guide. A self-contained introduction. With 57 Figures. Springer

Fred Hantelmann LINUX. Start-up Guide. A self-contained introduction. With 57 Figures. Springer Fred Hantelmann LINUX Start-up Guide A self-contained introduction With 57 Figures Springer Contents Contents Introduction 1 1.1 Linux Versus Unix 2 1.2 Kernel Architecture 3 1.3 Guide 5 1.4 Typographical

More information

Using Secure4Audit in an IRIX 6.5 Environment

Using Secure4Audit in an IRIX 6.5 Environment Using Secure4Audit in an IRIX 6.5 Environment Overview... 3 Icons... 3 Installation Reminders... 4 A Very Brief Overview of IRIX System auditing... 5 Installing System Auditing... 5 The System Audit Directories...

More information

Syntax: cd <Path> Or cd $<Custom/Standard Top Name>_TOP (In CAPS)

Syntax: cd <Path> Or cd $<Custom/Standard Top Name>_TOP (In CAPS) List of Useful Commands for UNIX SHELL Scripting We all are well aware of Unix Commands but still would like to walk you through some of the commands that we generally come across in our day to day task.

More information

A Crash Course in OS X D. Riley and M. Allen

A Crash Course in OS X D. Riley and M. Allen Objectives A Crash Course in OS X D. Riley and M. Allen To learn some of the basics of the OS X operating system - including the use of the login panel, system menus, the file browser, the desktop, and

More information

New Lab Intro to KDE Terminal Konsole

New Lab Intro to KDE Terminal Konsole New Lab Intro to KDE Terminal Konsole After completing this lab activity the student will be able to; Access the KDE Terminal Konsole and enter basic commands. Enter commands using a typical command line

More information

L01 Introduction to the Unix OS

L01 Introduction to the Unix OS Geophysical Computing L01-1 1. What is Unix? L01 Introduction to the Unix OS Unix is an operating system (OS): it manages the way the computer works by driving the processor, memory, disk drives, keyboards,

More information

Kernel. What is an Operating System? Systems Software and Application Software. The core of an OS is called kernel, which. Module 9: Operating Systems

Kernel. What is an Operating System? Systems Software and Application Software. The core of an OS is called kernel, which. Module 9: Operating Systems Module 9: Operating Systems Objective What is an operating system (OS)? OS kernel, and basic functions OS Examples: MS-DOS, MS Windows, Mac OS Unix/Linux Features of modern OS Graphical operating system

More information

ICS 351: Today's plan

ICS 351: Today's plan ICS 351: Today's plan routing protocols linux commands Routing protocols: overview maintaining the routing tables is very labor-intensive if done manually so routing tables are maintained automatically:

More information

Introduction to Operating Systems

Introduction to Operating Systems Introduction to Operating Systems It is important that you familiarize yourself with Windows and Linux in preparation for this course. The exercises in this book assume a basic knowledge of both of these

More information

User Profile Manager 2.6

User Profile Manager 2.6 User Profile Manager 2.6 User Guide ForensiT Limited, Innovation Centre Medway, Maidstone Road, Chatham, Kent, ME5 9FD England. Tel: US 1-877-224-1721 (Toll Free) Intl. +44 (0) 845 838 7122 Fax: +44 (0)

More information

NetBackup Backup, Archive, and Restore Getting Started Guide

NetBackup Backup, Archive, and Restore Getting Started Guide NetBackup Backup, Archive, and Restore Getting Started Guide UNIX, Windows, and Linux Release 6.5 Veritas NetBackup Backup, Archive, and Restore Getting Started Guide Copyright 2007 Symantec Corporation.

More information

Advanced Bash Scripting. Joshua Malone (jmalone@ubergeeks.com)

Advanced Bash Scripting. Joshua Malone (jmalone@ubergeeks.com) Advanced Bash Scripting Joshua Malone (jmalone@ubergeeks.com) Why script in bash? You re probably already using it Great at managing external programs Powerful scripting language Portable and version-stable

More information

Systems Programming & Scripting

Systems Programming & Scripting Systems Programming & Scripting Lecture 14 - Shell Scripting: Control Structures, Functions Syst Prog & Scripting - Heriot Watt University 1 Control Structures Shell scripting supports creating more complex

More information

Attix5 Pro. Your guide to protecting data with Attix5 Pro Desktop & Laptop Edition. V6.0 User Manual for Mac OS X

Attix5 Pro. Your guide to protecting data with Attix5 Pro Desktop & Laptop Edition. V6.0 User Manual for Mac OS X Attix5 Pro Your guide to protecting data with Attix5 Pro Desktop & Laptop Edition V6.0 User Manual for Mac OS X Copyright Notice and Proprietary Information All rights reserved. Attix5, 2011 Trademarks

More information

VERITAS NetBackup 6.0

VERITAS NetBackup 6.0 VERITAS NetBackup 6.0 Backup, Archive, and Restore Getting Started Guide for UNIX, Windows, and Linux N15278C September 2005 Disclaimer The information contained in this publication is subject to change

More information

Integrated Invoicing and Debt Management System for Mac OS X

Integrated Invoicing and Debt Management System for Mac OS X Integrated Invoicing and Debt Management System for Mac OS X Program version: 6.3 110401 2011 HansaWorld Ireland Limited, Dublin, Ireland Preface Standard Invoicing is a powerful invoicing and debt management

More information

Collaborative. An ANSYS Support Distributor

Collaborative. An ANSYS Support Distributor Date December 27, 1999 Memo Number STI24:991227B Subject ANSYS Tips & Tricks: License Monitoring and Reporting Keywords General: Configuration: Licensing: Reporting 1. Introduction: The networking licensing

More information

Running your first Linux Program

Running your first Linux Program Running your first Linux Program This document describes how edit, compile, link, and run your first linux program using: - Gnome a nice graphical user interface desktop that runs on top of X- Windows

More information

ICS Technology. PADS Viewer Manual. ICS Technology Inc PO Box 4063 Middletown, NJ 077748 732-671-5400 www.icstec.com

ICS Technology. PADS Viewer Manual. ICS Technology Inc PO Box 4063 Middletown, NJ 077748 732-671-5400 www.icstec.com ICS Technology PADS Viewer Manual ICS Technology Inc PO Box 4063 Middletown, NJ 077748 732-671-5400 www.icstec.com Welcome to PADS Viewer Page 1 of 1 Welcome to PADS Viewer Welcome to PADS (Public Area

More information

Unix Scripts and Job Scheduling

Unix Scripts and Job Scheduling Unix Scripts and Job Scheduling Michael B. Spring Department of Information Science and Telecommunications University of Pittsburgh spring@imap.pitt.edu http://www.sis.pitt.edu/~spring Overview Shell Scripts

More information

Using SVN to Manage Source RTL

Using SVN to Manage Source RTL Using SVN to Manage Source RTL CS250 Tutorial 1 (Version 083010a) August 30, 2010 Yunsup Lee In this tutorial you will gain experience using the Subversion (SVN) to manage your source RTL and code. You

More information

UNIX Intro and Basic C shell Scripting

UNIX Intro and Basic C shell Scripting UNIX Intro and Basic C shell Scripting Khaldoun Makhoul khaldoun@nmr.mgh.harvard.edu December 2nd 2010 1 This talk introduces the audience to the basic use of the UNIX/Linux command line tools and to basic

More information

Topic 2: Computer Management File Management Folders A folder is a named storage location where related files can be stored. A folder also known as

Topic 2: Computer Management File Management Folders A folder is a named storage location where related files can be stored. A folder also known as Topic 2: Computer Management File Management Folders A folder is a named storage location where related files can be stored. A folder also known as directory in some operating systems, all folders or directories

More information

1. Product Information

1. Product Information ORIXCLOUD BACKUP CLIENT USER MANUAL LINUX 1. Product Information Product: Orixcloud Backup Client for Linux Version: 4.1.7 1.1 System Requirements Linux (RedHat, SuSE, Debian and Debian based systems such

More information

Computer Programming In QBasic

Computer Programming In QBasic Computer Programming In QBasic Name: Class ID. Computer# Introduction You've probably used computers to play games, and to write reports for school. It's a lot more fun to create your own games to play

More information

Cleaning your Windows 7, Windows XP and Macintosh OSX Computers

Cleaning your Windows 7, Windows XP and Macintosh OSX Computers Cleaning your Windows 7, Windows XP and Macintosh OSX Computers A cleaning of your computer can help your computer run faster and make you more efficient. We have listed some tools and how to use these

More information

sqlcmd -S.\SQLEXPRESS -Q "select name from sys.databases"

sqlcmd -S.\SQLEXPRESS -Q select name from sys.databases A regularly scheduled backup of databases used by SyAM server programs (System Area Manager, Management Utilities, and Site Manager can be implemented by creating a Windows batch script and running it

More information

CS2720 Practical Software Development

CS2720 Practical Software Development Page 1 Rex Forsyth CS2720 Practical Software Development CS2720 Practical Software Development Scripting Tutorial Srping 2011 Instructor: Rex Forsyth Office: C-558 E-mail: forsyth@cs.uleth.ca Tel: 329-2496

More information

Microsoft Outlook 2007 Introductory guide for staff

Microsoft Outlook 2007 Introductory guide for staff Platform: Windows PC Ref no: USER180 Date: 8 th January 2008 Version: 1 Authors: Julie Adams, Claire Napier Microsoft Outlook 2007 Introductory guide for staff This document provides an introduction to

More information

Basic Linux & Package Management. Original slides from GTFO Security

Basic Linux & Package Management. Original slides from GTFO Security Basic Linux & Package Management Original slides from GTFO Security outline Linux What it is? Commands Filesystem / Shell Package Management Services run on Linux mail dns web central authentication router

More information

PuTTY/Cygwin Tutorial. By Ben Meister Written for CS 23, Winter 2007

PuTTY/Cygwin Tutorial. By Ben Meister Written for CS 23, Winter 2007 PuTTY/Cygwin Tutorial By Ben Meister Written for CS 23, Winter 2007 This tutorial will show you how to set up and use PuTTY to connect to CS Department computers using SSH, and how to install and use the

More information

Understanding Files and Folders

Understanding Files and Folders Windows Files and Folders Overview Before I get into Windows XP's method of file management, let's spend a little space on a files and folder refresher course. (Just in case you forgot, of course.) The

More information

Backing Up TestTrack Native Project Databases

Backing Up TestTrack Native Project Databases Backing Up TestTrack Native Project Databases TestTrack projects should be backed up regularly. You can use the TestTrack Native Database Backup Command Line Utility to back up TestTrack 2012 and later

More information

Backup Tab. User Guide

Backup Tab. User Guide Backup Tab User Guide Contents 1. Introduction... 2 Documentation... 2 Licensing... 2 Overview... 2 2. Create a New Backup... 3 3. Manage backup jobs... 4 Using the Edit menu... 5 Overview... 5 Destination...

More information

Table of Contents. Page 3

Table of Contents. Page 3 Welcome to Exchange Mail Customer Full Name Your e-mail is now being delivered and stored on the new Exchange server. Your new e-mail address is @rit.edu. This is the e-mail address that you should give

More information

University of Hull Department of Computer Science. Wrestling with Python Week 01 Playing with Python

University of Hull Department of Computer Science. Wrestling with Python Week 01 Playing with Python Introduction Welcome to our Python sessions. University of Hull Department of Computer Science Wrestling with Python Week 01 Playing with Python Vsn. 1.0 Rob Miles 2013 Please follow the instructions carefully.

More information

FirstClass Export Tool User and Administration Guide

FirstClass Export Tool User and Administration Guide FirstClass Export Tool User and Administration Guide Werner de Jong Senior Business Product Manager Email: wdejong@opentext.com Mobile: +44 7789 691288 Twitter: @wernerdejong July 2011 (last update March

More information

Ayear ago, I wrote an article entitled

Ayear ago, I wrote an article entitled by Peter Collinson, Hillside Systems MICHELLE FRIESENHAHN WILBY Customizing CDE Ayear ago, I wrote an article entitled The Common Desktop Environment (June 1996, Page 22) in which I discussed the basics

More information

Online Backup Client User Manual Linux

Online Backup Client User Manual Linux Online Backup Client User Manual Linux 1. Product Information Product: Online Backup Client for Linux Version: 4.1.7 1.1 System Requirements Operating System Linux (RedHat, SuSE, Debian and Debian based

More information

Using FTP to Update Your Site

Using FTP to Update Your Site Using FTP to Update Your Site To get started accessing your ServInt account, you will need a computer with Internet access to begin uploading your web files from. Any type of computer which can handle

More information

Avaya Network Configuration Manager User Guide

Avaya Network Configuration Manager User Guide Avaya Network Configuration Manager User Guide May 2004 Avaya Network Configuration Manager User Guide Copyright Avaya Inc. 2004 ALL RIGHTS RESERVED The products, specifications, and other technical information

More information

CPSC2800: Linux Hands-on Lab #3 Explore Linux file system and file security. Project 3-1

CPSC2800: Linux Hands-on Lab #3 Explore Linux file system and file security. Project 3-1 CPSC2800: Linux Hands-on Lab #3 Explore Linux file system and file security Project 3-1 Linux support many different file systems that can be mounted using the mount command. In this project, you use the

More information

Sophos Anti-Virus for Mac OS X Help

Sophos Anti-Virus for Mac OS X Help Sophos Anti-Virus for Mac OS X Help For networked and standalone Macs running Mac OS X version 10.4 or later Product version: 8 Document date: April 2012 Contents 1 About Sophos Anti-Virus...3 2 Scanning

More information

You may have been given a download link on your trial software email. Use this link to download the software.

You may have been given a download link on your trial software email. Use this link to download the software. BackupVault / Attix5 Server Quickstart Guide This document takes about 5 minutes to read and will show you how to: Download the software Install the Attix5 Professional Backup software Backup your files

More information

All Tech Notes and KBCD documents and software are provided "as is" without warranty of any kind. See the Terms of Use for more information.

All Tech Notes and KBCD documents and software are provided as is without warranty of any kind. See the Terms of Use for more information. Tech Note 115 Overview of the InTouch 7.0 Windows NT Services All Tech Notes and KBCD documents and software are provided "as is" without warranty of any kind. See the Terms of Use for more information.

More information

BASH Scripting. A bash script may consist of nothing but a series of command lines, e.g. The following helloworld.sh script simply does an echo.

BASH Scripting. A bash script may consist of nothing but a series of command lines, e.g. The following helloworld.sh script simply does an echo. BASH Scripting bash is great for simple scripts that automate things you would otherwise by typing on the command line. Your command line skills will carry over to bash scripting and vice versa. bash comments

More information

HARFORD COMMUNITY COLLEGE 401 Thomas Run Road Bel Air, MD 21015 Course Outline CIS 110 - INTRODUCTION TO UNIX

HARFORD COMMUNITY COLLEGE 401 Thomas Run Road Bel Air, MD 21015 Course Outline CIS 110 - INTRODUCTION TO UNIX HARFORD COMMUNITY COLLEGE 401 Thomas Run Road Bel Air, MD 21015 Course Outline CIS 110 - INTRODUCTION TO UNIX Course Description: This is an introductory course designed for users of UNIX. It is taught

More information

Microsoft Windows Overview Desktop Parts

Microsoft Windows Overview Desktop Parts Microsoft Windows Overview Desktop Parts Icon Shortcut Icon Window Title Bar Menu Bar Program name Scroll Bar File Wallpaper Folder Start Button Quick Launch Task Bar or Start Bar Time/Date function 1

More information