Introduction to UNIX - Pennsylvania State University

Introduction to UNIX - Pennsylvania State University

IST 210 Introduction to UNIX (AIX) Todd Bacastow IST 210: Organization of Data IST 210 Introduction to UNIX (AIX) UNIX developed at Bell Labs in 70s One of the oldest and most reliable OS Linux, SUN/Solaris are UNIX kernel with additional features

IST 210 Introduction to UNIX Basic Commands (like DOS prompt) List files - ls Copy files - cp file1 file2 Move/Rename files mv file1 file2 Delete files rm

DANGEROUS COMMAND One can delete all his/her files by mistake Write alias rm rm i every time log on to play safe IST 210 Introduction to UNIX Some more commands

mkdir mydir to make a new directory cd mydir to change directory man mkdir display help about a command cd - to come back to your home directory We will use ssh client to log onto UNIX machines IST 210 Connect to IBM DB2 First log on to rs6klab.aset.psu.edu

Enter username and password (CAC) Type the following commands >source /home/db2clnt/sqllib/db2cshrc >db2 IST 210 Inside IBM DB2 Some simple commands

db2>list database directory to show databases db2>connect to classale to connect to a database db2>select * from pennstate.zipcodes Now you can start typing SQL Remember no semi-colons needed IST 210

Dot notation Dot notation refers to prefixing the table names to column names, to avoid ambiguity, as such: SELECT S.sname FROM Sailors S, Reserves R WHERE S.sid = R.sid AND R.bid = 103 Or it can be used to identify [schema].[tablename] SELECT * FROM tsb4.names IST 210 Example

If user tsb4 creates the table test as below: db2 => CREATE TABLE test (item1 INT,item2 CHAR(50)) db2 => INSERT INTO test VALUES (10, Test) you would have to access that users table by first connecting to tsb4 and then querying the table similar to the command below. Db2 => connect to tsb4 db2 => select * from tsb4.test IST 210 Running SQL From File in UNIX Create a file (create.sql ) with the SQL

statements using PICO in the UNIX window: Connect to classale; Create Table Sample1(Partno Int, Partdesc Char(50)) 'cd' to the directory where you have stored the script. Type and run the following command: [UNIX Prompt]: db2 -tvf create.sql The parameter 't' refers that the default statement delimiter(;) has been used, 'v' represents verbose mode output and 'f' tells the command that the string following is the name of a file containing

Recently Viewed Presentations

  • Marketplace for Nutritious Foods Marketing training for Businesses

    Marketplace for Nutritious Foods Marketing training for Businesses

    Customer archetype. Njeri ... Interviewing customers is a skill that takes practice to get good at it. A good interviewer is a good detective. Someone that looks for the facts with a critical mind, and does not look to confirm...
  • Automated GenerationTactics for Strategy Games Machine Learning in

    Automated GenerationTactics for Strategy Games Machine Learning in

    Typically, players in RTS games start a game with only very few game options, and as they gradually move up the technology ladder, new game options will open up to them. In order to let the dynamic AI only select...
  • Balanced Math - Weebly

    Balanced Math - Weebly

    Balanced Math. Works in tandem with any math curriculum you are currently using… Is not a scripted 'program', rather an approach to organizing your math instruction (math workshop model)…
  • Nervous System Taylor, Kyra, Ryan, and Brennan Function

    Nervous System Taylor, Kyra, Ryan, and Brennan Function

    Taylor, Kyra, Ryan, and Brennan. Nervous System . Function of Central and Peripheral Systems. integrating sensory information and responding accordingly. The spinal cord serves as a conduit for signals between the brain and the rest of the body.
  • Missional River 2.0 Learning Seminar A  One thing

    Missional River 2.0 Learning Seminar A One thing

    Donalds. with my friends who had a car. By the time I got home, guess what? ... If you have ever felt like there was NOT adequate or accurate representation of your racial group, sexual orientation group, gender group, and/or...
  • NAVIGATING THE PERILOUS WATERS OF VALIDATION THE CASE

    NAVIGATING THE PERILOUS WATERS OF VALIDATION THE CASE

    Dr Wenqi Li, UCL. Prof Stephen MacKenna. Andrew McNeil. Dr Siyamalan Mannivannan. Dr Enrico Pellegrini, OPTOS plc. Dr Adria Perez Rovira, UoRotterdam. Haocheng Shen. Dr Sebastian Stein, UGlasgow. Dr Roy Wang. Kris Zutis, NHS Tayside. VAMPIRE EDINBURGH. Dr Tom MacGillivray....
  • Modified and Animated By Chris Headlee Apr 2014

    Modified and Animated By Chris Headlee Apr 2014

    Volume = lwh = s. 3. 64 = s. 3. 4 = s. SA = 6s. 2 = 6(4) 2 = 96. SSM: find formulas on formula sheet. Ch 12 . Coordinate Relations and Transformations. Rectangle's diagonals bisect each other...
  • Introduction to Computing and Programming in Python: A ...

    Introduction to Computing and Programming in Python: A ...

    Import sys Insert the JES sources into your sys.path From media import * That's it! Thanks to John Sanders of Suffolk University for contributions to these slides! ... 2 MS Pゴシック Wingdings Flow 1_Flow 2_Flow 3_Flow Introduction to Computing and...