CS 307: UNIX PROGRAMMING ENVIRONMENT KATAS FOR EXAM 1

Similar documents
CS 307: UNIX PROGRAMMING ENVIRONMENT KATAS FOR EXAM 2

Week 2 Lecture 3. Unix

CS 307: UNIX PROGRAMMING ENVIRONMENT FIND COMMAND

Introduction to the UNIX command line

Unix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University

Unix Guide. Meher Krishna Patel. Created on : Octorber, 2017 Last updated : December, More documents are freely available at PythonDSP

Introduction to Unix: Fundamental Commands

Linux & Shell Programming 2014

Chapter-3. Introduction to Unix: Fundamental Commands

CS CS Tutorial 2 2 Winter 2018

COSC UNIX. Textbook. Grading Scheme

EE516: Embedded Software Project 1. Setting Up Environment for Projects

3/8/2017. Unix/Linux Introduction. In this part, we introduce. What does an OS do? Examples

Introduction to Linux. Fundamentals of Computer Science

Linux Shell Script. J. K. Mandal

Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades Q2

Mills HPC Tutorial Series. Linux Basics I

CISC 220 fall 2011, set 1: Linux basics

Processes. Shell Commands. a Command Line Interface accepts typed (textual) inputs and provides textual outputs. Synonyms:

Part 1: Basic Commands/U3li3es

Linux at the Command Line Don Johnson of BU IS&T

CSE 303 Lecture 2. Introduction to bash shell. read Linux Pocket Guide pp , 58-59, 60, 65-70, 71-72, 77-80

UNIX COMMANDS AND SHELLS. UNIX Programming 2015 Fall by Euiseong Seo

Introduction to Linux Environment. Yun-Wen Chen

Lab Working with Linux Command Line

Multiple Choice - 58 Questions - 10 of 15%

Introduction to Linux

Table of contents. Our goal. Notes. Notes. Notes. Summer June 29, Our goal is to see how we can use Unix as a tool for developing programs

Introduction to the Linux Command Line

Prof. Navrati Saxena TA: R. Sachan

Lezione 8. Shell command language Introduction. Sommario. Bioinformatica. Mauro Ceccanti e Alberto Paoluzzi

Introduction: What is Unix?

User Guide Version 2.0

Introduction to Unix - Lab Exercise 0

CENG 334 Computer Networks. Laboratory I Linux Tutorial

Lezione 8. Shell command language Introduction. Sommario. Bioinformatica. Esercitazione Introduzione al linguaggio di shell

Unix Basics. Systems Programming Concepts

CSE Linux VM. For Microsoft Windows. Based on opensuse Leap 42.2

Useful Unix Commands Cheat Sheet

LING 408/508: Computational Techniques for Linguists. Lecture 5

Basic UNIX Commands BASIC UNIX COMMANDS. 1. cat command. This command is used to create a file in unix. Syntax: $ cat filename

Intro to Linux. this will open up a new terminal window for you is super convenient on the computers in the lab

2. UDP Client, UDP Server

Introduction to Linux

Introduction to Linux Workshop 1

Chapter Two. Lesson A. Objectives. Exploring the UNIX File System and File Security. Understanding Files and Directories

Unix Handouts. Shantanu N Kulkarni

Getting your department account

EECS 2031E. Software Tools Prof. Mokhtar Aboelaze

Getting Started With UNIX Lab Exercises

Operating Systems. Copyleft 2005, Binnur Kurt

COMS 6100 Class Notes 3

Introduction of Linux

Operating Systems 3. Operating Systems. Content. What is an Operating System? What is an Operating System? Resource Abstraction and Sharing

CS 143A. Principles of Operating Systems. Instructor : Prof. Anton Burtsev

Introduction to UNIX Command Line

Getting Started. Running Utilities. Shells. Special Characters. Special Characters. Chapter 2 Unix Utilities for non-programmers

Introduction to Unix and Linux. Workshop 1: Directories and Files

UNIX ASSIGNMENT 1 TYBCA (Sem:V)

Name: Tej. D. Shah Subject:CC-304 Linux Uni. Practical programme College :L.J. College Of Computer Application. Questions:

d. 1 e. test: $a: integer expression expected

Introduction to Linux

Oregon State University School of Electrical Engineering and Computer Science. CS 261 Recitation 1. Spring 2011

CS 3410 Intro to Unix, shell commands, etc... (slides from Hussam Abu-Libdeh and David Slater)

Unix as a Platform Exercises. Course Code: OS-01-UNXPLAT

Chapter 4. Unix Tutorial. Unix Shell

Introduction in Unix. Linus Torvalds Ken Thompson & Dennis Ritchie

Introduction to UNIX command-line II

Chap2: Operating-System Structures

Basic UNIX commands. HORT Lab 2 Instructor: Kranthi Varala

IBM AIX Basic Operations V5.

5/8/2012. Creating and Changing Directories Chapter 7

Linux Essentials. Programming and Data Structures Lab M Tech CS First Year, First Semester

1. What statistic did the wc -l command show? (do man wc to get the answer) A. The number of bytes B. The number of lines C. The number of words

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version...

History. Terminology. Opening a Terminal. Introduction to the Unix command line GNOME

CS Unix Tools. Lecture 2 Fall Hussam Abu-Libdeh based on slides by David Slater. September 10, 2010

Working with Basic Linux. Daniel Balagué

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines

EECS Software Tools. Lab 2 Tutorial: Introduction to UNIX/Linux. Tilemachos Pechlivanoglou

Essential Linux Shell Commands

LOG ON TO LINUX AND LOG OFF

CSC209H Lecture 1. Dan Zingaro. January 7, 2015

Common UNIX Commands. Unix. User Interfaces. Unix Commands Winter COMP 1270 Computer Usage II 9-1. Using UNIX. Unix has a command line interface

Basic Linux (Bash) Commands

Understanding bash. Prof. Chris GauthierDickey COMP 2400, Fall 2008

CS 25200: Systems Programming. Lecture 11: *nix Commands and Shell Internals

Introduction to UNIX command-line

A Brief Introduction to Unix

-1- csh cd. cd alias!! ; set prompt=" pwd % " 16 cd. 17 cd.. 18 his /home% set prompt. alias. yasuoka : root :

The UNIX Shells. Computer Center, CS, NCTU. How shell works. Unix shells. Fetch command Analyze Execute

Welcome to Linux. Lecture 1.1

Unix background. COMP9021, Session 2, Using the Terminal application, open an x-term window. You type your commands in an x-term window.

Unix Filesystem. January 26 th, 2004 Class Meeting 2

Outline. Structure of a UNIX command

5/20/2007. Touring Essential Programs

Helpful Tips for Labs. CS140, Spring 2015

Using LINUX a BCMB/CHEM 8190 Tutorial Updated (1/17/12)

The Unix Shell. Pipes and Filters

Introduction to Linux Part I: The Filesystem Luca Heltai

Transcription:

CS 307: UNIX PROGRAMMING ENVIRONMENT KATAS FOR EXAM 1 Prof. Michael J. Reale Fall 2014

COMMAND KATA 0

Command Kata 0: Preparation First, go to ~/cs307 cd ~/cs307 Make directory dkata0 and go to it mkdir dkata0; cd dkata0 Make a script called kata0 script kata0 When we re done: exit

Command Kata 0 Where am I? pwd Create directory kata mkdir kata What is in my current location? ls Go to directory kata cd kata Where am I? pwd Go to parent directory cd.. Where am I? pwd Remove directory kata rmdir kata What is in my current location? ls

COMMAND KATA 1

Command Kata 1: Preparation First, go to ~/cs307 cd ~/cs307 Make directory dkata1 and go to it mkdir dkata1; cd dkata1 Make a script called kata1 script kata1 When we re done: exit

Command Kata 1 Create file abc What is in this folder? Copy abc to def What is in this folder? Rename abc to ghi What is in this folder? Remove def and ghi files What is in this folder? touch abc ls cp abc def ls mv abc ghi ls rm def ghi ls

COMMAND KATA 2

Command Kata 2: Preparation First, go to ~/cs307 Create folder called dkata2 and go to it mkdir dkata2; cd dkata2 Create a script called kata2 script kata2 When we re done, we ll type exit Exit ^ = CTRL key

Command Kata 2 Type abc ; DON T hit Enter abc Hit ^A and type begin begin abc Hit ^E and type end begin abc end Hit ^U and type erase erase Hit Enter; ignore error Hit ^L and type clear clear Hit Enter (also does clear) Send me a message! write realemj Type some message Hi there! Hit ^D (EOF)

COMMAND KATA 3: Crouching Directory, Hidden Files

Command Kata 3: Preparation First, go to ~/cs307 cd ~/cs307 Make directory dkata3 and go to it mkdir dkata3; cd dkata3 Make a script called kata3 script kata3 When we re done: exit

Command Kata 3 Create directory path mkdir p foo/bar/fudge Go to path cd foo/bar/fudge Make file abc touch abc Make file HIDDEN.dragon touch.dragon List contents ls List ALL contents ls a Make file excellent touch excellent List long format ls l List ALL, 1 column, sorted by modified date ls ta1 Remove all files rm excellent abc.dragon List ALL ls -a Go to ~cs307 cd ~/cs307 Remove directory path rmdir p foo/bar/fudge

COMMAND KATA 4: WILDCARD STRIKE

Command Kata 4: Preparation First, go to ~/cs307 cd ~/cs307 Make directory dkata4 and go to it mkdir dkata4; cd dkata4 Make a script called kata4 script kata4 When we re done: exit

Command Kata 4 Create directory dkata4 and go to it mkdir dkata4; cd dkata4 Make many files touch a ab ac abc bc d de def List files beginning with a ls a* List files beginning with a and one character ls a? List files beginning with a through c ls [a-c]* List files with b in the name ls *b* List files beginning with ab OR de ls {ab,de}* Go to parent directory cd.. Delete dkata4 and all its content rm rf dkata4

COMMAND KATA 5: PERMISSION QUEST

Command Kata 5: Preparation First, go to ~/cs307 cd ~/cs307 Make directory dkata5 and go to it mkdir dkata5; cd dkata5 Make a script called kata5 script kata5 When we re done: exit

Command Kata 5 Create file yeflask echo You cannot get ye flask > yeflask Check permissions ls l Change permissions to 200 chmod 200 yeflask Check permissions ls -l Try to read file cat yeflask Change permissions to 400 chmod 400 yeflask Check permissions ls l Try to read file cat yeflask Try to append to file echo Again >> yeflask Change permissions to 100 chmod 100 yeflask Check permissions ls -l Try to delete file (say y ) rm yeflask

COMMAND KATA 6: THE LEGEND OF ZELDA

Command Kata 6: Preparation First, go to ~/cs307 cd ~/cs307 Make directory dkata6 and go to it mkdir dkata6; cd dkata6 Make a script called kata6 script kata6 When we re done: exit

Command Kata 6: Part 1 Create directory hyrule and go to it mkdir hyrule; cd hyrule Create file zelda touch zelda See how many links to zelda ls l Create hard link sheik ln zelda sheik See how many links to zelda ls l Remove zelda rm zelda See how many links to sheik ls l

Command Kata 6: Part 2 Create soft link to hyrule called overworld ln s hyrule overworld Look at links ls -l Go to overworld (logically) and pwd (physical) cd overworld; pwd Go to parent and remove hyrule cd.. ; rm rf hyrule Try to go to overworld cd overworld Remove overworld rm overworld

COMMAND KATA 7: VARIABLES

Command Kata 6: Preparation First, go to ~/cs307 cd ~/cs307 Make directory dkata7 and go to it mkdir dkata7; cd dkata7 Make a script called kata7 script kata7 When we re done: exit

Command Kata 7: The Way of Bourne Start a Bash shell bash Create a shell variable BESTMOVIE= Supremacy Print value of variable echo ${BESTMOVIE} Start a new bash shell bash Print value of variable echo ${BESTMOVIE} Exit shell exit Make variable an environment variable export BESTMOVIE Start a new bash shell bash Print value of variable echo ${BESTMOVIE} Exit shell exit Exit shell again exit

Command Kata 7: The Way of the C (Shell) Start tcsh tcsh Create shell variable set ocean= Atlantic Print value of variable echo ${ocean} Create environment variable setenv OCEAN Pacific Start tcsh shell tcsh Print value of shell variable echo ${ocean} Print value of environment variable echo ${OCEAN} Exit shell exit Exit shell again exit