<<

Marn Norling November 2012 Lecture Goals

• Goal 1: Know basic UNIX commands and their use from memory. • Goal 2: Know how to find informaon on advanced UNIX commands and their use. • Goal 3: Understand the basics of regular expression paerns. • Goal 4: Know the basic loops and condionals for shell scripng and understand how to use them. UNIX Schedule

Thursday Friday 09.00-09.45 UNIX introducon 09.00-09.45 Bash Scripng 10.00-10.45 UNIX basics 10.00-10.45 Tutorial: Bash scripng 11.00-12.00 Redirects to regexp 11.00-12.00 Tips & Quesons 12.00-13.00 Lunch 12.00-13.00 Lunch 13.00-16.00 Tutorial: Basics 13.00-16.00 Tutorial: finishing up

UNIX HISTORY UNIX History

• 1969 – First Version of UNIX developed at by AT&T • 1975 – UNIX 6, the first to be widely available outside Bell Labs. The first “Berkeley Soware Distribuon” (BSD) is released. • 1989 – UNIX System , the last tradional UNIX version. • 1991 – begin developing . “UNIX-like”

• Today – UNIX itself, what’s now called “tradional UNIX” is not used, except by enthusiasts. • There are many “UNIX-like” systems (also known as *nix or UN*X) that are similar to UNIX while not conforming to the Single UNIX Specificaon. • In fact, most operang systems today except windows are “UNIX like”. Single UNIX Specificaon (SUS)

• Developed and maintained by the Ausn Group, based on earlier work by the IEEE and . • In 1988, these standards became IEEE 1003 (also registered as ISO/IEC 9945), or POSIX, which loosely stands for “Portable Operang System Interface for uniX” • Last major revision 2008, POSIX:2008 (formally: IEEE Std 1003.1-2008) UNIX-like History

1969 Unics 1969 Open Source 1971 to 1973 UnixTSS 1 to 4 Mixed/Shared Source 1971 to 1973 1974 to 1975 UnixTSS PWB/Unix 5 to 6 Closed Source 1974 to 1975 1978 BSD 1978 1.0 to 2.0 UnixTSS 1979 7 1979 Unix 32v

1980 BSD 1980 3.0 to 4.1 1981 System III 1.0 to 2.3 1981 1982 Xenix 1982 3.0 1983 BSD 4.2 Sun OS System V 1983 1 to 1.1 R1 to R2 1984 SCO Xenix 1984 UnixTSS 1985 8 SCO Xenix 1985 AIX W286 System V 1986 BSD 4.3 1.0 R3 HP/UX Sun OS 1.0 to 1.2 1986 1.2 to 3.0 SCO Xenix 1987 UnixTSS V386 1987 (Time Sharing HP/UX 1988 System) BSD 4.3 System V R4 2.0 to 3.0 1988 9 to 10 Tahoe SCO Xenix 1989 W386 1989 BSD 4.3 1990 Reno 1990 BSD NET/2 1991 Linux 0.0.1 1991 Sun OS 4 1.x NEXTSTEP/ 386BSD OPENSTEP 1992 1992 1.0 to 4.0 HP/UX NetBSD 6 to 11 Linux BSD 0.8 to 1.0 1993 1993 0.95 to 1.2.x SCO Unix 4.4 to 3.2.4 Unixware FreeBSD 4.4 lite2 1.x to 2.x 1994 1994 1.0 to 1995 2.2.x NetBSD OpenBSD 1995 1.1 to 1.2 OpenServer 1.0 to 2.2 5.0 to 5.04 Solaris 1996 AIX 2.1 to 10 1996 3.x to 7.1 1997 1997 NetBSD 1.3 1998 FreeBSD 1998 3.0 to 3.2 Minix OpenServer Unixware 1999 2.x Mac OS X 5.0.5 to 5.0.7 7.x Linux 2000 1999 2.0 to 2.6.x OpenBSD 2.3 to 5.0 2000 2001 to 2004 FreeBSD NetBSD 2001 to 2004 3.3 to 8.2 1.3 to 5.x HP/UX 2005 Mac OS X 11i to 11i v3 2005 10.0 to 10.7.x (Darwin) OpenServer OpenSolaris 2006 to 2010 Minix 6.0 2008.05 to 2006 to 2010 3.x 2009. 2011 Linux 3.x 2011 Open Source

• GNU GPL, versions 2 and 3 is very common. Mostly known for demanding that all derived works must also be released under the same license (or a compable license) giving rise to the term “”. • BSD Licenses are similar but more permissive. It’s possible to take BSD licensed code, modify it and release it as closed source. UNIX SYSTEMS

Mac OS X We’re doing this!! OS of the TOP 500

Linux

AIX

CNK/SUSE

RedHat

Cray Linux

bullx SUCOS

CentOS

CNL

Windows HPC

Super-UX

Open Solaris

Cell OS UNIX COMMAND LINE BASICS The command line Command line stucture

Square brackets mean “oponal”! Arguments are the “target” of the command Format: $ command [switches] [arguments]

The prompt! Tells you your scope.

Switches control the behavior of the command The stuff you have to remember

Move ! !!!!!!!!!!! List ! !!!!!!!!!!ls ! Copy ! !!!!!!!!!!cp! Remove ! !!!!!!!!!rm! Change Directory! !!!!cd! Print Working Directory !pwd! Manual ! !!!!!!!!!man! Example! Quesons?