11
Before we start… Getting Started

Before we start…Getting Started. UST Outline History Getting Started Basic commands (command line) Operations on Files and Directories Input and Output

Embed Size (px)

Citation preview

Page 1: Before we start…Getting Started. UST Outline History Getting Started Basic commands (command line) Operations on Files and Directories Input and Output

Before we start…Getting Started

Page 2: Before we start…Getting Started. UST Outline History Getting Started Basic commands (command line) Operations on Files and Directories Input and Output

UST Outline

• History• Getting Started• Basic commands (command line)• Operations on Files and Directories• Input and Output• Editors (Emacs, gedit, vi)• Processes and jobs. • Regular expressions and pattern matching. • Shell scripts (sed, awk)• Maybe Programming (perl, python)

Page 3: Before we start…Getting Started. UST Outline History Getting Started Basic commands (command line) Operations on Files and Directories Input and Output

Before we start 1

• An overview of the course. • be patient, the learning curve is steeper than

with windows, but you will develop a deeper appreciation of computers after mastering Unix.

• no viruses with Unix• many people (and companies and

governments!) are switching to Unix and Linux• You will do a lot of typing, rather than clicking

and dragging icons (maybe you should learn to touch type!).

Page 4: Before we start…Getting Started. UST Outline History Getting Started Basic commands (command line) Operations on Files and Directories Input and Output

Before we start 2

• look at the environment as you learn, and you will learn more. be observant.

• think about what you are doing.

• Unix can be thought of as not being user friendly

• Unix is in contrast to Windows.

Page 5: Before we start…Getting Started. UST Outline History Getting Started Basic commands (command line) Operations on Files and Directories Input and Output

Before we start 3

• you may love/hate Windows/Unix.

• try and develop a balance perspective.

• you can switch between operating systems.

• but you should learn to use both (why?).

• Unix offers diversity from windows.

Page 6: Before we start…Getting Started. UST Outline History Getting Started Basic commands (command line) Operations on Files and Directories Input and Output

Getting Started

• You will not know everything about Unix, part of this course is to teach you how to find it.

• You need to do Unix to learn it, not just read about it.

• You cannot learn it just from the man pages, like you cannot learn a language from a dictionary, or java from the API.

Page 7: Before we start…Getting Started. UST Outline History Getting Started Basic commands (command line) Operations on Files and Directories Input and Output

ASCII

• ASCII (American Standard Code For Information Interchange), is a numerical code for characters.

• 7 bits providing 128 characters.• Unicode has now been developed (www.unicode.org)• Unix is case sensitive.• Control characters (e.g. ^L clears the screen, ^H is

backspace, ^C cancels a login attempt)• What do ^A and ^E do?• the Unix environment is unforgiving, so be careful.

Page 8: Before we start…Getting Started. UST Outline History Getting Started Basic commands (command line) Operations on Files and Directories Input and Output

Shells

• Unix often comes with three main shells.

• Bourne and Korn shells use the dollar $ prompt. The C shell uses percent %

• You can find out your shell by echo $SHELL

• To log out type exit or logout or quit.

• Read the error messages (Just like you should be doing with Java)

Page 9: Before we start…Getting Started. UST Outline History Getting Started Basic commands (command line) Operations on Files and Directories Input and Output

Advice 1

• ^C kills a command, and ^Z suspends the command.

• Unix terminals are typically left switched on.

• keep your password secret. passwd to change your password

• keep a list of commands you have found useful during the course.

Page 10: Before we start…Getting Started. UST Outline History Getting Started Basic commands (command line) Operations on Files and Directories Input and Output

Advice 2

• use the tab key to auto-complete commands and arguments.

• semi-colon ; can connect two commands. • pipe | send output of one command to input of

next command. • man (manual) command to find out about

commands. • Windows confirms almost everything, • Unix confirms almost nothing - so be careful

(unless you use interactive mode).

Page 11: Before we start…Getting Started. UST Outline History Getting Started Basic commands (command line) Operations on Files and Directories Input and Output

Advice 3

• Always think – is there an easier way to do this (remember computing is all about efficiency)

• Always think – is there another way to do this. Often doing things a different way make you think about what you are doing.

• Always think – has someone else already solved this problem.

• Always think – can what you are doing be automated. Computer thrive on repetitive processes.

• Make a list of commands you use (along with the options)