Getting your department account

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

Unix Filesystem. January 26 th, 2004 Class Meeting 2

Chapter-3. Introduction to Unix: Fundamental Commands

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

A Brief Introduction to Unix

Unix File System. Class Meeting 2. * Notes adapted by Joy Mukherjee from previous work by other members of the CS faculty at Virginia Tech

Introduction to Unix: Fundamental Commands

Commands are in black

Introduction to the UNIX command line

Files

CSC209. Software Tools and Systems Programming.

Introduction to Linux

Week 2 Lecture 3. Unix

Welcome to getting started with Ubuntu Server. This System Administrator Manual. guide to be simple to follow, with step by step instructions

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

Chapter 1 - Introduction. September 8, 2016

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

Linux Command Line Primer. By: Scott Marshall

Perl and R Scripting for Biologists

M.C.A. (Sem.-lll) (CBCS) Examination November CCA-3003 Operating System and LinuxlUnix programming

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

GNU/Linux 101. Casey McLaughlin. Research Computing Center Spring Workshop Series 2018

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

CS197U: A Hands on Introduction to Unix

When talking about how to launch commands and other things that is to be typed into the terminal, the following syntax is used:

Lab 2: Linux/Unix shell

UNIX File Hierarchy: Structure and Commands

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

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

CSCI 2132 Software Development. Lecture 4: Files and Directories

Files and Directories

Open up a terminal, make sure you are in your home directory, and run the command.

Introduction to Linux

Introduction to Linux Workshop 1

Introduction to Linux (Part I) BUPT/QMUL 2018/03/14

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

Introduction of Linux

Overview LEARN. History of Linux Linux Architecture Linux File System Linux Access Linux Commands File Permission Editors Conclusion and Questions

Linux Shell Script. J. K. Mandal

Set 1 MCQ Which command is used to sort the lines of data in a file in reverse order A) sort B) sh C) st D) sort -r

Files (review) and Regular Expressions. Todd Kelley CST8207 Todd Kelley 1

Lab Working with Linux Command Line

Introduction Into Linux Lecture 1 Johannes Werner WS 2017

Operating Systems. Copyleft 2005, Binnur Kurt

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

A Brief Introduction to the Linux Shell for Data Science

Linux Systems Administration Getting Started with Linux

This lab exercise is to be submitted at the end of the lab session! passwd [That is the command to change your current password to a new one]

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University

Mills HPC Tutorial Series. Linux Basics I

Introduction to Linux Part I: The Filesystem Luca Heltai

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

National University of Computer and Emerging Sciences Operating System Lab - 02 Lab Manual

COMS 6100 Class Notes 3

Introduction to Linux

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

THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering

Linux for Beginners. Windows users should download putty or bitvise:

CSC209. Software Tools and Systems Programming.

5/20/2007. Touring Essential Programs

Overview of the UNIX File System. Navigating and Viewing Directories

Course 144 Supplementary Materials. UNIX Fundamentals

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

Introduction to Linux

Introduction to the Linux Command Line

You will automatically be in your user (home) directory when you login.

Using UNIX. -rwxr--r-- 1 root sys Sep 5 14:15 good_program

QUESTION BANK ON UNIX & SHELL PROGRAMMING-502 (CORE PAPER-2)

CS 215 Fundamentals of Programming II Spring 2019 Very Basic UNIX

CST8207: GNU/Linux Operating Systems I Lab Six Linux File System Permissions. Linux File System Permissions (modes) - Part 1

Overview of the UNIX File System

Introduction p. 1 Who Should Read This Book? p. 1 What You Need to Know Before Reading This Book p. 2 How This Book Is Organized p.

Multiple Choice - 58 Questions - 10 of 15%

Unix Tools / Command Line

Basic UNIX commands. HORT Lab 2 Instructor: Kranthi Varala

CS Fundamentals of Programming II Fall Very Basic UNIX

Introduction to UNIX Command Line

commandname flags arguments

Operating Systems. Engr. Abdul-Rahman Mahmood MS, PMP, MCP, QMR(ISO9001:2000) alphapeeler.sf.net/pubkeys/pkey.htm

CS 307: UNIX PROGRAMMING ENVIRONMENT KATAS FOR EXAM 1

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

Lecture # 2 Introduction to UNIX (Part 2)

UTA Tech Orientation Spring 2019

Embedded Linux Systems. Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island

Crash Course in Unix. For more info check out the Unix man pages -orhttp:// -or- Unix in a Nutshell (an O Reilly book).

Working with Basic Linux. Daniel Balagué

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

Introduction to Linux. Roman Cheplyaka

Basic Survival UNIX.

Unix L555. Dept. of Linguistics, Indiana University Fall Unix. Unix. Directories. Files. Useful Commands. Permissions. tar.

Physics REU Unix Tutorial

IMPORTANT: Logging Off LOGGING IN

Linux Essentials Objectives Topics:

Linux & Shell Programming 2014

Getting started with Hugs on Linux

Introduction to UNIX command-line

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

Introduction: What is Unix?

Std: XI CHAPTER-3 LINUX

Essential Unix and Linux! Perl for Bioinformatics, ! F. Pineda

Transcription:

02/11/2013 11:35 AM Getting your department account The instructions are at Creating a CS account

02/11/2013 11:36 AM Getting help Vijay Adusumalli will be in the CS majors lab in the basement of the Love Building from 11:00am until 1:00pm everyday from Wednesday, January 23, until Monday, January 28, (except for Sunday, January 27) to help you if you cannot get set up.

02/11/2013 11:36 AM Getting connected: "logging in" Fundamental to the idea of Unix is the idea of "logging in". This means 1. Presenting some sort of credentials (maybe in an automated fashion) 2. Having a "shell" process created for you 3. Using the "shell" process

02/11/2013 11:36 AM Unconnecting: logging out When you want to leave the system, ("log out"), you have many choices: "exit" should work for any shell, and is usually your best choice CTRL-D is very likely to work also Most login shells also will accept "logout" "bye" is sometimes accepted, but don't count on it

02/11/2013 11:37 AM Who else is on the system? who command w command users command

02/11/2013 11:37 AM Communicating with other users: traditional Mail write wall talk irc

02/11/2013 11:37 AM Finding out more with man man CMD man FILE man -k KEYWORD

02/11/2013 11:37 AM ls, the root, and your home directory ls is a useful command; like dir in the Windows world, it shows you what is in a directory. The most useful options are -l : list long information -t : order via modified time rather than by name -a : show "dot" (hidden) files -R : recursive listing -r : reverse the order -h : "human" readable

02/11/2013 11:37 AM The "root" On the "root", you expect to find at least these directories: /bin /etc /lib /usr /var /tmp

02/11/2013 11:38 AM In addition, you are likely to also see at least these: /boot /dev /home

02/11/2013 11:38 AM We do have standards: Unix standard Linux standard Also, try man hier.

02/11/2013 11:38 AM Your home directory In addition to any files and directories that you might create in your home directory, there are often a number of other files and directories that might be there. Generally these are what we call "dot" files: literally, the first character in the file/directory name is a period. The program ls ignores such files unless it has been given the -a (all) option. In addition, what we call "globbing" ignores "dot" files unless you explicitly include such a dot.

02/11/2013 11:38 AM So what is "globbing"? The idea behind globbing is to treat the characters "*", "?", "[]", "{}", and "~" as "metacharacters". * matches any string of characters? matches any one character [] matches a range of characters {} matches specific characters ~ expands to either your home directory (as unadorned initial ~), or $HOME for another user if ~user

02/11/2013 11:38 AM "dot" files/directories and why are they there!? "Dot" files generally are used by programs such as shells and windowing environments which have a need to have and retain complex state, such as startup commands and current information.

02/11/2013 11:39 AM Creating files and directories the major ways: touch mkdir cp / mv redirecting output text editors programs

02/11/2013 11:39 AM changing file permissions To change permissions, we use the chmod command: chmod u+x chmod g+x chmod o+x chmod a+x chmod a-x chmod g-r # add execute permission for the user # add execute permission for group # add execute permission for other # add execute permission for all users # remove execute permission for all users # remove read permission for group

02/11/2013 11:39 AM umask 077 umask 000 umask 022 umask 777 File permission defaults Shells generally have an "built-in" command called umask which allows the user to specify the default permissions for newly created files. It actually specifies the complement of the default read-write permissions for newly created files. # no one except the user can read or write new files # anyone can read or write all new files (dangerous!) # anyone can read but not write new files # no one (not even the owner) can read or write new files

02/11/2013 11:39 AM Working with files % cal 1776 > 1776.calendar.txt % cal 1752 > 1752.calendar.txt We can use many programs to examine this file: cat, less, and od are among the most popular, but also head, tail, and even grep are also quite useful.

02/11/2013 11:39 AM Joining files with cat You can use cat to join multiple files together: cat 1776.calendar.txt 1752.calendar.txt > both.txt cat 17{76,52}.calendar.txt > both.txt # or with append cat 1776.calendar.txt > both.txt cat 1752.calendar.txt >> both.txt

02/11/2013 11:40 AM Copying with cp cp both.txt copy.txt # copies, but uses new date and # umask default permissions for new file cp -a both.txt # creates an exact copy cp -r.mozilla.mozilla-backup # creates a new copy of a dir # but times are new and permissions # are umask-controlled cp -a.mozilla.mozilla-exact # creates an exact copy of a dir

02/11/2013 11:40 AM Moving files Moving files with mv is usually far faster than copying the same files with cp. If a file is in the same filesystem (and if it's in your home directory it very likely is), then mv just changes some directory information rather than doing anything with the contents. cp of course must work with the contents (unless you are using a very sophisticated filesystem that understands on-the-fly deduplication.) mv both.txt old.txt mv.mozilla.mozilla-2013-01-22 # notice that no option is necessary # to specify directory operations

02/11/2013 11:40 AM Removing files Removing files is easy maybe too easy! rm old.txt rm -rf.mozilla rm -rf / rmdir.somedir/ # remove a directory without complaining # remove everything in the system (bad idea!) # doesn't work unless.somedir/ is empty