Python. Directory and File Paths

Size: px
Start display at page:

Download "Python. Directory and File Paths"

Transcription

1 Copyright Software Carpentry and The University of Edinburgh This work is licensed under the Creative Commons Attribution License See for more information.

2 >>> base = '/users' >>> user = 'vlad' >>> datadir = 'data' We want to build a path users vlad data planets.txt

3 >>> base = '/users' >>> user = 'vlad' Use string addition >>> datadir = 'data' >>> path = base + '/' + user + '/' + datadir >>> print path /users/vlad/data users vlad data planets.txt

4 >>> base = '/users' >>> user = 'vlad' >>> datadir = 'data' >>> path = base + '/' + user + '/' + datadir >>> print path /users/vlad/data Code assumes Linux/UNIX paths

5 >>> base = '/users' >>> user = 'vlad' >>> datadir = 'data' >>> path = base + '/' + user + '/' + datadir >>> print path /users/vlad/data >>> from os.path import join

6 >>> base = '/users' >>> user = 'vlad' >>> datadir = 'data' >>> path = base + '/' + user + '/' + datadir >>> print path /users/vlad/data >>> from os.path import join >>> path = join(base, user, datadir)

7 >>> base = '/users' >>> user = 'vlad' >>> datadir = 'data' >>> path = base + '/' + user + '/' + datadir >>> print path /users/vlad/data >>> from os.path import join >>> path = join(base, user, datadir) >>> print path /users/vlad/data

8 >>> base = '/users' >>> user = 'vlad' >>> datadir = 'data' >>> path = base + '/' + user + '/' + datadir >>> print path /users/vlad/data >>> from os.path import join >>> path = join(base, user, datadir) >>> print path /users/vlad/data join picks the file separator based on the current operating system

9 >>> base = '/users' >>> user = 'vlad' >>> datadir = 'data' >>> path = join(base, user, datadir) >>> print path /users\\vlad\\data Running under Windows

10 >>> base = '/users' >>> user = 'vlad' >>> datadir = 'data' >>> path = join(base, user, datadir) >>> print path /users\\vlad\\data Running under Windows join chooses the Windows separator The double \ is only because we re printing them

11 >>> base = '/users' >>> user = 'vlad' >>> datadir = 'data' >>> path = join(base, user, datadir) >>> print path /users\\vlad\\data Running under Windows join chooses the Windows separator The double \ is only because we re printing them But it starts with a Linux/UNIX file separator How do we convert that?

12 >>> base = '/users' >>> user = 'vlad' >>> datadir = 'data' >>> path = join(base, user, datadir) >>> print path /users\\vlad\\data >>> from os.path import normpath

13 >>> base = '/users' >>> user = 'vlad' >>> datadir = 'data' >>> path = join(base, user, datadir) >>> print path /users\\vlad\\data >>> from os.path import normpath >>> nupath = normpath(path) >>> print nupath \\users\\vlad\\data

14 >>> base = '/users' >>> user = 'vlad' >>> datadir = 'data' >>> path = join(base, user, datadir) >>> print path /users\\vlad\\data >>> from os.path import normpath >>> nupath = normpath(path) >>> print nupath \\users\\vlad\\data >>> normpath('/some/other/path') \\some\\other\\path normpath converts path separators

15 >>> path = '/users/vlad//.///data/../..//vlad/./data/..' rmpath not only converts path separators

16 >>> path = '/users/vlad//.///data/../..//vlad/./data/..' >>> cleanpath = normpath(path) >>> print cleanpath /users/vlad rmpath not only converts path separators

17 >>> path = '/users/vlad//.///data/../..//vlad/./data/..' >>> cleanpath = normpath(path) >>> print cleanpath /users/vlad rmpath not only converts path separators, it moves duplicated path separators

18 >>> path = '/users/vlad//.///data/../..//vlad/./data/..' >>> cleanpath = normpath(path) >>> print cleanpath /users/vlad rmpath not only converts path separators, it moves duplicated path separators d. current directory short-hand

19 >>> path = '/users/vlad//.///data/../..//vlad/./data/..' >>> cleanpath = normpath(path) >>> print cleanpath /users/vlad mpath not only converts path separators, it moves duplicated path separators moves. current directory short-hand es to resolve.. parent directory short-hand

20 >>> from os.path import dirname, basename

21 >>> from os.path import dirname, basename >>> path = '/users/vlad/data/planets.txt' users vlad data planets.txt

22 >>> from os.path import dirname, basename >>> path = '/users/vlad/data/planets.txt' >>> dirname(path) /users/vlad/data users vlad data planets.txt

23 >>> from os.path import dirname, basename >>> path = '/users/vlad/data/planets.txt' >>> dirname(path) /users/vlad/data >>> basename(path) planets.txt users vlad data planets.txt

24 >>> from os.path import dirname, basename >>> path = '/users/vlad/data/planets.txt' >>> dirname(path) /users/vlad/data >>> basename(path) planets.txt >>> from os.path import split >>> (head, tail) = split(path) users vlad data planets.txt

25 >>> from os.path import dirname, basename >>> path = '/users/vlad/data/planets.txt' >>> dirname(path) /users/vlad/data >>> basename(path) planets.txt >>> from os.path import split >>> (head, tail) = split(path) >>> print head /users/vlad/data users vlad data planets.txt

26 >>> from os.path import dirname, basename >>> path = '/users/vlad/data/planets.txt' >>> dirname(path) /users/vlad/data >>> basename(path) planets.txt >>> from os.path import split >>> (head, tail) = split(path) >>> print head /users/vlad/data >>> print tail planets.txt users vlad data planets.txt

27 >>> from os.path import splitext >>> path = '/users/vlad/data/planets.txt'

28 >>> from os.path import splitext >>> path = '/users/vlad/data/planets.txt' >>> (root, ext) = splitext(path)

29 >>> from os.path import splitext >>> path = '/users/vlad/data/planets.txt' >>> (root, ext) = splitext(path) >>> print root /users/vlad/data/planets

30 >>> from os.path import splitext >>> path = '/users/vlad/data/planets.txt' >>> (root, ext) = splitext(path) >>> print root /users/vlad/data/planets >>> print ext.txt

31 >>> from os.path import splitdrive >>> path = 'C:\\users\\vlad\\data\\planets.txt' >>> (drive, tail) = splitdrive(path)

32 >>> from os.path import splitdrive >>> path = 'C:\\users\\vlad\\data\\planets.txt' >>> (drive, tail) = splitdrive(path) >>> print drive C:

33 >>> from os.path import splitdrive >>> path = 'C:\\users\\vlad\\data\\planets.txt' >>> (drive, tail) = splitdrive(path) >>> print drive C: >>> print tail \\users\\vlad\\data\\planets.txt

34 >>> path = 'data/planets.txt' data planets.txt

35 >>> path = 'data/planets.txt' >>> from os.path import isabs >>> isabs(path) False isabs checks is the path is absolute data planets.txt

36 >>> path = 'data/planets.txt' >>> from os.path import isabs >>> isabs(path) False is the path is absolute does it start with /? oes it start with \ after the drive s been removed? data planets.txt

37 >>> path = 'data/planets.txt' >>> from os.path import isabs >>> isabs(path) False >>> from os.path import abspath >>> nupath = abspath(path) users vlad abspath makes relative paths absolute data planets.txt

38 >>> path = 'data/planets.txt' >>> from os.path import isabs >>> isabs(path) False >>> from os.path import abspath >>> nupath = abspath(path) >>> print abspath /users/vlad/data/planets.txt abspath makes relative paths absolute users vlad data planets.txt

39 >>> path = 'data/planets.txt' >>> from os.path import isabs >>> isabs(path) False >>> from os.path import abspath >>> nupath = abspath(path) >>> print abspath /users/vlad/data/planets.txt abspath makes relative paths absolute It uses getcwd() users vlad data planets.txt

40 >>> path = 'data/planets.txt' >>> from os.path import isabs >>> isabs(path) False >>> from os.path import abspath >>> nupath = abspath(path) >>> print abspath /users/vlad/data/planets.txt >>> isabs(nupath) True users vlad data planets.txt

41 >>> path = 'data/planets.txt' >>> from os.path import isabs >>> isabs(path) False >>> from os.path import abspath >>> nupath = abspath(path) >>> print abspath /users/vlad/data/planets.txt >>> isabs(nupath) True >>> abspath('data/../..') data....

42 >>> path = 'data/planets.txt' >>> from os.path import isabs >>> isabs(path) False >>> from os.path import abspath >>> nupath = abspath(path) >>> print abspath /users/vlad/data/planets.txt >>> isabs(nupath) True >>> abspath('data/../..') /users users vlad data....

43 >>> path = 'data/planets.txt' >>> from os.path import isabs >>> isabs(path) False >>> from os.path import abspath >>> nupath = abspath(path) >>> print abspath /users/vlad/data/planets.txt >>> isabs(nupath) True >>> abspath('data/../..') /users abspath also normalizes the path users vlad data

44 Beware! None of these operations check whether the directories or files exist

45 Beware! None of these operations check whether the directories or files exist Remember os.path exists function

46 os.path join normpath dirname basename split splitext splitdrive isabs abspath Common pathname manipulations Join relative paths together using operating systemspecific separators Clean up a path and convert separators to be consistent with the current operating system Get the path up to the final directory/file in the path Get the final directory/file in the path Split a path into directory and file name Split a path to get a file extension Split a path to get a drive name Is a path relative or absolute? Convert a path to an absolute path, using getcwd()

47 created by Mike Jackson and Greg Wilson May 2011 Copyright Software Carpentry and The University of Edinburgh This work is licensed under the Creative Commons Attribution License See for more information.

STSCI Python Introduction

STSCI Python Introduction STSCI Python Introduction Class 5 Jim Hare Today s Agenda stpydb Module database interface module os Module commonly used methods os.path Module Manipulates pathnames shutil Module - High-level file operations

More information

The Unix Shell. Files and Directories

The Unix Shell. Files and Directories The Unix Shell Copyright Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See http://software-carpentry.org/license.html for more information. Run Programs Store

More information

fool Documentation Release 0.1 Nathan Typanski

fool Documentation Release 0.1 Nathan Typanski fool Documentation Release 0.1 Nathan Typanski November 28, 2014 Contents 1 fool package 3 1.1 fool.chapter module........................................... 3 1.2 fool.conflicts module...........................................

More information

Sets and Dictionaries

Sets and Dictionaries Copyright Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See http://software-carpentry.org/license.html for more information. Let's try an experiment Let's

More information

Automated Builds. Rules

Automated Builds. Rules Copyright Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See http://software-carpentry.org/license.html for more information. Manage tasks and dependencies

More information

The Unix Shell. Job Control

The Unix Shell. Job Control The Unix Shell Copyright Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See http://software-carpentry.org/license.html for more information. shell shell $

More information

The Unix Shell. Pipes and Filters

The Unix Shell. Pipes and Filters The Unix Shell Copyright Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See http://software-carpentry.org/license.html for more information. shell shell pwd

More information

Automated Builds. Macros

Automated Builds. Macros Copyright Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See http://software-carpentry.org/license.html for more information. Manage tasks and dependencies

More information

rpaths Documentation Release 0.2 Remi Rampin

rpaths Documentation Release 0.2 Remi Rampin rpaths Documentation Release 0.2 Remi Rampin June 09, 2014 Contents 1 Introduction 1 2 Classes 3 2.1 Abstract classes............................................. 3 2.2 Concrete class Path............................................

More information

The Unix Shell. Permissions

The Unix Shell. Permissions The Unix Shell Copyright Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See http://software-carpentry.org/license.html for more information. shell shell pwd,

More information

CSCI 2132 Software Development. Lecture 4: Files and Directories

CSCI 2132 Software Development. Lecture 4: Files and Directories CSCI 2132 Software Development Lecture 4: Files and Directories Instructor: Vlado Keselj Faculty of Computer Science Dalhousie University 12-Sep-2018 (4) CSCI 2132 1 Previous Lecture Some hardware concepts

More information

The Unix Shell. Job Control

The Unix Shell. Job Control The Unix Shell Copyright Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See http://software-carpentry.org/license.html for more information. shell shell $

More information

Classes and Objects. Inheritance

Classes and Objects. Inheritance Copyright Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See http://software-carpentry.org/license.html for more information. Interpolating time series signals

More information

The Unix Shell. The Secure Shell

The Unix Shell. The Secure Shell The The Copyright Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See http://software-carpentry.org/license.html for more information. $ pwd shell $ pwd /users/vlad

More information

A list is a mutable heterogeneous sequence

A list is a mutable heterogeneous sequence Copyright Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See http://software-carpentry.org/license.html for more information. A list is a mutable heterogeneous

More information

A simple interpreted language

A simple interpreted language Copyright Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See http://software-carpentry.org/license.html for more information. A simple interpreted language

More information

yawd-elfinder Documentation

yawd-elfinder Documentation yawd-elfinder Documentation Release 0.91.00-rc1 yawd February 27, 2017 Contents 1 Django version compatibility 3 1.1 Requirements............................................... 3 1.2 Installation & Setup...........................................

More information

13 File Structures. Source: Foundations of Computer Science Cengage Learning. Objectives After studying this chapter, the student should be able to:

13 File Structures. Source: Foundations of Computer Science Cengage Learning. Objectives After studying this chapter, the student should be able to: 13 File Structures 13.1 Source: Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: Define two categories of access methods: sequential

More information

COMS 469: Interactive Media II

COMS 469: Interactive Media II COMS 469: Interactive Media II Agenda Review Files and Directories Review User Defined Functions Cookies File Includes CMS Admin Login Review User Defined Functions Input arguments Output Return values

More information

If you re like me, you ve probably written a Python script or two that

If you re like me, you ve probably written a Python script or two that DAVID BEAZLEY David Beazley is an open source developer and author of the Python Essential Reference (4th Edition, Addison-Wesley, 2009). He is also known as the creator of Swig (http://www.swig.org) and

More information

Version Control. Ioannis N. Athanasiadis. with slides from Solution Perspective Media and Software Carpentry

Version Control. Ioannis N. Athanasiadis. with slides from Solution Perspective Media and Software Carpentry Ioannis N. Athanasiadis with slides from Solution Perspective Media and Software Carpentry http://springuniversity.bc3research.org/ 1 What is it A method for centrally storing files Keeping a record of

More information

What to Do? Convert pathnames to common interface. Different ways to access files. Absolute pathname

What to Do? Convert pathnames to common interface. Different ways to access files. Absolute pathname Resolving Pathnames What to Do? Convert pathnames to common interface Absolute pathname Different ways to access files Relative to root directory Relative to current directory Relative to previous directory

More information

CS Programming Languages: Python

CS Programming Languages: Python CS 3101-1 - Programming Languages: Python Lecture 5: Exceptions / Daniel Bauer (bauer@cs.columbia.edu) October 08 2014 Daniel Bauer CS3101-1 Python - 05 - Exceptions / 1/35 Contents Exceptions Daniel Bauer

More information

Chapter 1 - Introduction. September 8, 2016

Chapter 1 - Introduction. September 8, 2016 Chapter 1 - Introduction September 8, 2016 Introduction Overview of Linux/Unix Shells Commands: built-in, aliases, program invocations, alternation and iteration Finding more information: man, info Help

More information

CST Algonquin College 2

CST Algonquin College 2 Partitions Lab due dates: Labs are due as specified usually on Page1 of the Lab document Lab due dates are expressed as: 10 min before the end of the lab period during a certain week There is a grace period

More information

UNIX Tutorial One

UNIX Tutorial One 1.1 Listing files and directories ls (list) When you first login, your current working directory is your home directory. Your home directory has the same name as your user-name, for example, ee91ab, and

More information

Basic filesystem concepts. Tuesday, November 22, 2011

Basic filesystem concepts. Tuesday, November 22, 2011 Physical Page 1 Basic filesystem concepts Tuesday, November 22, 2011 2:04 PM Review of basic filesystem concepts A filesystem is a structure on disk that Allows one to store and retrieve files. Keeps track

More information

rpaths Documentation Release 0.13 Remi Rampin

rpaths Documentation Release 0.13 Remi Rampin rpaths Documentation Release 0.13 Remi Rampin Aug 02, 2018 Contents 1 Introduction 1 2 Classes 3 2.1 Abstract classes............................................. 3 2.2 Concrete class Path............................................

More information

Introduction to python

Introduction to python Introduction to python 13 Files Rossano Venturini rossano.venturini@unipi.it File System A computer s file system consists of a tree-like structured organization of directories and files directory file

More information

Disks, Filesystems 1

Disks, Filesystems 1 Disks, Filesystems 1 sudo and PATH (environment) disks partitioning formatting file systems: mkfs command checking file system integrity: fsck command /etc/fstab mounting file systems: mount command unmounting

More information

Disks, Filesystems, Booting Todd Kelley CST8177 Todd Kelley 1

Disks, Filesystems, Booting Todd Kelley CST8177 Todd Kelley 1 Disks, Filesystems, Booting Todd Kelley kelleyt@algonquincollege.com CST8177 Todd Kelley 1 sudo and PATH (environment) disks partitioning formatting file systems: mkfs command checking file system integrity:

More information

Files and Directories

Files and Directories CSCI 2132: Software Development Files and Directories Norbert Zeh Faculty of Computer Science Dalhousie University Winter 2019 Files and Directories Much of the operation of Unix and programs running on

More information

Automating common tasks

Automating common tasks Chapter 16 Automating common tasks One of the great advantages of the Python language is the ability to write programs that scan through your computer and perform some operation on each file.filesareorganized

More information

Introduction to Linux

Introduction to Linux Introduction to Linux University of Bristol - Advance Computing Research Centre 1 / 47 Operating Systems Program running all the time Interfaces between other programs and hardware Provides abstractions

More information

CSCI 2132 Software Development. Lecture 5: File Permissions

CSCI 2132 Software Development. Lecture 5: File Permissions CSCI 2132 Software Development Lecture 5: File Permissions Instructor: Vlado Keselj Faculty of Computer Science Dalhousie University 14-Sep-2018 (5) CSCI 2132 1 Files and Directories Pathnames Previous

More information

The Directory Structure

The Directory Structure The Directory Structure All the files are grouped together in the directory structure. The file-system is arranged in a hierarchical structure, like an inverted tree. The top of the hierarchy is traditionally

More information

Python. Input and Output

Python. Input and Output Copyright Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See http://software-carpentry.org/license.html for more information. Been using print to see what

More information

Identifying Updated Metadata and Images from a Content Provider

Identifying Updated Metadata and Images from a Content Provider University of Iowa Libraries Staff Publications 4-8-2010 Identifying Updated Metadata and Images from a Content Provider Wendy Robertson University of Iowa 2010 Wendy C Robertson Comments Includes presenter's

More information

CS F-11 B-Trees 1

CS F-11 B-Trees 1 CS673-2016F-11 B-Trees 1 11-0: Binary Search Trees Binary Tree data structure All values in left subtree< value stored in root All values in the right subtree>value stored in root 11-1: Generalizing BSTs

More information

Handles and Directories

Handles and Directories Handles and Directories P. J. Denning For CS471/CS571 2001, P. J. Denning Handles Handles: system-generated names for objects Issued: by object class manager on creating object Protected: OS tries to prevent

More information

User Guide to. NovaFold. Version 12.3

User Guide to. NovaFold. Version 12.3 User Guide to NovaFold Version 12.3 DNASTAR, Inc. 2015 NovaFold Overview NovaFold, DNASTAR s 3D protein structure prediction program, can use a sequence file to predict ligand binding sites and protein

More information

What we already know. more of what we know. results, searching for "This" 6/21/2017. chapter 14

What we already know. more of what we know. results, searching for This 6/21/2017. chapter 14 What we already know chapter 14 Files and Exceptions II Files are bytes on disk. Two types, text and binary (we are working with text) open creates a connection between the disk contents and the program

More information

Linux & Shell Programming 2014

Linux & Shell Programming 2014 Unit -1: Introduction to UNIX/LINUX Operating System Practical Practice Questions: Find errors (if any) otherwise write output or interpretation of following commands. (Consider default shell is bash shell.)

More information

Scripting With Jython

Scripting With Jython Scripting With Jython In this chapter, we will look at scripting with Jython. For our purposes, we will define scripting as the writing of small programs to help out with daily tasks. These tasks are things

More information

A function is a way to turn a bunch of related statements into a single "chunk"

A function is a way to turn a bunch of related statements into a single chunk Copyright Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See http://software-carpentry.org/license.html for more information. A function is a way to turn a

More information

Functions and Families

Functions and Families Unit 3 Functions and Families Name: Date: Hour: Function Transformations Notes PART 1 By the end of this lesson, you will be able to Describe horizontal translations and vertical stretches/shrinks of functions

More information

Disks, Filesystems Todd Kelley CST8177 Todd Kelley 1

Disks, Filesystems Todd Kelley CST8177 Todd Kelley 1 Disks, Filesystems Todd Kelley kelleyt@algonquincollege.com CST8177 Todd Kelley 1 sudo and PATH (environment) disks partitioning formatting file systems: mkfs command checking file system integrity: fsck

More information

Section 1.6 & 1.7 Parent Functions and Transformations

Section 1.6 & 1.7 Parent Functions and Transformations Math 150 c Lynch 1 of 8 Section 1.6 & 1.7 Parent Functions and Transformations Piecewise Functions Example 1. Graph the following piecewise functions. 2x + 3 if x < 0 (a) f(x) = x if x 0 1 2 (b) f(x) =

More information

Programming in Python Advanced

Programming in Python Advanced Programming in Python Advanced Duration: 3 days, 8 hours a day Pre-requisites: * Participants should be comfortable with the following technologies: Basic and working knowledge of the Pyton If new to the

More information

Grade 6 Integers. Answer the questions. Choose correct answer(s) from the given choices. For more such worksheets visit

Grade 6 Integers. Answer the questions. Choose correct answer(s) from the given choices. For more such worksheets visit ID : cn6integers [1] Grade 6 Integers For more such worksheets visit www.edugain.com Answer the questions (1) If a and b are two integers such that a is the predecessor of b, then what is the value of

More information

When working with files and directories, it is often

When working with files and directories, it is often VERIFY THAT A FILE OR DIRECTORY EXISTS When working with files and directories, it is often necessary to verify that a file or directory exists before performing an action. For example, you should verify

More information

Area51 Roll: Users Guide. Version 4.1 Edition

Area51 Roll: Users Guide. Version 4.1 Edition Area51 Roll: Users Guide Version 4.1 Edition Area51 Roll: Users Guide : Version 4.1 Edition Published Oct 2005 Copyright 2005 UC Regents Table of Contents Preface...i 1. Requirements...1 1.1. Rocks Version...1

More information

6/3/2016 8:44 PM 1 of 35

6/3/2016 8:44 PM 1 of 35 6/3/2016 8:44 PM 1 of 35 6/3/2016 8:44 PM 2 of 35 2) Background Well-formed XML HTML XSLT Processing Model 6/3/2016 8:44 PM 3 of 35 3) XPath XPath locates items within an XML file It relies on the XML

More information

Lesson #6: Basic Transformations with the Absolute Value Function

Lesson #6: Basic Transformations with the Absolute Value Function Lesson #6: Basic Transformations with the Absolute Value Function Recall: Piecewise Functions Graph:,, What parent function did this piecewise function create? The Absolute Value Function Algebra II with

More information

INTEGRATING WITH LDAP DIRECTORIES

INTEGRATING WITH LDAP DIRECTORIES INTEGRATING WITH LDAP DIRECTORIES 1 BACKGROUND This document outlines the steps involved in integrating Unity Desktop with an LDAP-compliant directory (including Microsoft Active Directory) for click-to-dial

More information

rsync link-dest Local, rotated, quick and useful backups!

rsync link-dest Local, rotated, quick and useful backups! rsync link-dest Local, rotated, quick and useful backups! Scope No complete scripts will be presented Just enough so that a competent scripter will be able to build what they need Unixes used: OpenBSD,

More information

Integers and Absolute Value. Unit 1 Lesson 5

Integers and Absolute Value. Unit 1 Lesson 5 Unit 1 Lesson 5 Students will be able to: Understand integers and absolute value Key Vocabulary: An integer Positive number Negative number Absolute value Opposite Integers An integer is a positive or

More information

Unix File System. Learning command-line navigation of the file system is essential for efficient system usage

Unix File System. Learning command-line navigation of the file system is essential for efficient system usage ULI101 Week 02 Week Overview Unix file system File types and file naming Basic file system commands: pwd,cd,ls,mkdir,rmdir,mv,cp,rm man pages Text editing Common file utilities: cat,more,less,touch,file,find

More information

Chapter 5 Naming. Names, Identifiers, and Addresses

Chapter 5 Naming. Names, Identifiers, and Addresses Chapter 5 Naming 1 Names, Identifiers, and Addresses In a distributed system, a name is used to refer to an entity (e.g., computer, service, remote object, file, user) An address is a name that refers

More information

NCUSD 203 Campus Portal Login FAQ

NCUSD 203 Campus Portal Login FAQ This document will provide you answers to all of your questions regarding setting up and troubleshooting issues with your Campus Portal Login Account. Please see the list of frequently questions below.

More information

MINI-HOWTO backup and/or restore device or partition using zsplit/unzsplit

MINI-HOWTO backup and/or restore device or partition using zsplit/unzsplit MINI-HOWTO backup and/or restore device or partition using zsplit/unzsplit Jurij Ivastsuk-Kienbaum jurij [at] device-image.de Revision History First draft March 14, 2006 This document describes a setup

More information

Motivation for B-Trees

Motivation for B-Trees 1 Motivation for Assume that we use an AVL tree to store about 20 million records We end up with a very deep binary tree with lots of different disk accesses; log2 20,000,000 is about 24, so this takes

More information

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.

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. 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. 2 Conventions Used in This Book p. 2 Introduction to UNIX p. 5 An Overview

More information

User Commands tar ( 1 )

User Commands tar ( 1 ) NAME tar create tape archives and add or extract files SYNOPSIS tar c [ bbeeffhiklnoppqvwx@ [0-7]] [block] [tarfile] [exclude-file] {-I include-file -C directory file file}... tar r [ bbeeffhiklnqvw@ [0-7]]

More information

Bioinformatics? Reads, assembly, annotation, comparative genomics and a bit of phylogeny.

Bioinformatics? Reads, assembly, annotation, comparative genomics and a bit of phylogeny. Bioinformatics? Reads, assembly, annotation, comparative genomics and a bit of phylogeny stefano.gaiarsa@unimi.it Linux and the command line PART 1 Survival kit for the bash environment Purpose of the

More information

CS301 - Data Structures Glossary By

CS301 - Data Structures Glossary By CS301 - Data Structures Glossary By Abstract Data Type : A set of data values and associated operations that are precisely specified independent of any particular implementation. Also known as ADT Algorithm

More information

9.0 Help for Community Managers About Jive for Google Docs...4. System Requirements & Best Practices... 5

9.0 Help for Community Managers About Jive for Google Docs...4. System Requirements & Best Practices... 5 for Google Docs Contents 2 Contents 9.0 Help for Community Managers... 3 About Jive for Google Docs...4 System Requirements & Best Practices... 5 Administering Jive for Google Docs... 6 Quick Start...6

More information

PathInfo: A file information object in Python

PathInfo: A file information object in Python PathInfo: A file information object in Python John W. Shipman 2013-09-25 16:24 Abstract Describes a class in the Python programming language that represents information about a file, as well as several

More information

CSCE 2014 Final Exam Spring Version A

CSCE 2014 Final Exam Spring Version A CSCE 2014 Final Exam Spring 2017 Version A Student Name: Student UAID: Instructions: This is a two-hour exam. Students are allowed one 8.5 by 11 page of study notes. Calculators, cell phones and computers

More information

This is Lab Worksheet 3 - not an Assignment

This is Lab Worksheet 3 - not an Assignment This is Lab Worksheet 3 - not an Assignment This Lab Worksheet contains some practical examples that will prepare you to complete your Assignments. You do not have to hand in this Lab Worksheet. Make sure

More information

Computer Engineering II Solution to Exercise Sheet 9

Computer Engineering II Solution to Exercise Sheet 9 Distributed Computing FS 6 Prof. R. Wattenhofer Computer Engineering II Solution to Exercise Sheet 9 Basic HDDs a) For a random workload, the tracks in the middle of a platter are favored since on average,

More information

SciDetect TM Documentation

SciDetect TM Documentation SciDetect TM Documentation http://scidetect.forge.imag.fr Nguyen Minh Tien Minh-Tien.nguyen@imag.fr Cyril Labbé first.last@imag.fr March 2015 Revision History Version Date Author Comment 1.4 13-02-2015

More information

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

Chapter Two. Lesson A. Objectives. Exploring the UNIX File System and File Security. Understanding Files and Directories Chapter Two Exploring the UNIX File System and File Security Lesson A Understanding Files and Directories 2 Objectives Discuss and explain the UNIX file system Define a UNIX file system partition Use the

More information

WINTER. Web Development. Template. PHP Variables and Constants. Lecture

WINTER. Web Development. Template. PHP Variables and Constants. Lecture WINTER Template Web Development PHP Variables and Constants Lecture-3 Lecture Content What is Variable? Naming Convention & Scope PHP $ and $$ Variables PHP Constants Constant Definition Magic Constants

More information

Python. First-Class Functions

Python. First-Class Functions Copyright Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See http://software-carpentry.org/license.html for more information. An integer is 32 bits of data...

More information

CS435 Introduction to Big Data FALL 2018 Colorado State University. 11/7/2018 Week 12-B Sangmi Lee Pallickara. FAQs

CS435 Introduction to Big Data FALL 2018 Colorado State University. 11/7/2018 Week 12-B Sangmi Lee Pallickara. FAQs 11/7/2018 CS435 Introduction to Big Data - FALL 2018 W12.B.0.0 CS435 Introduction to Big Data 11/7/2018 CS435 Introduction to Big Data - FALL 2018 W12.B.1 FAQs Deadline of the Programming Assignment 3

More information

CSE 530A. B+ Trees. Washington University Fall 2013

CSE 530A. B+ Trees. Washington University Fall 2013 CSE 530A B+ Trees Washington University Fall 2013 B Trees A B tree is an ordered (non-binary) tree where the internal nodes can have a varying number of child nodes (within some range) B Trees When a key

More information

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

5/8/2012. Creating and Changing Directories Chapter 7 Creating and Changing Directories Chapter 7 Types of files File systems concepts Using directories to create order. Managing files in directories. Using pathnames to manage files in directories. Managing

More information

Effective Programming Practices for Economists. 7. Version Control, Part II: Git with a Shared Repository

Effective Programming Practices for Economists. 7. Version Control, Part II: Git with a Shared Repository Effective Programming Practices for Economists 7. Version Control, Part II: Git with a Shared Repository Hans-Martin von Gaudecker Department of Economics, Universität Bonn Collaboration Science in general

More information

Data Structures and Algorithms

Data Structures and Algorithms Data Structures and Algorithms CS245-2008S-19 B-Trees David Galles Department of Computer Science University of San Francisco 19-0: Indexing Operations: Add an element Remove an element Find an element,

More information

Data Science and Machine Learning Essentials

Data Science and Machine Learning Essentials Data Science and Machine Learning Essentials Lab 2B Transforming Data with Scripts By Graeme Malcolm and Stephen Elston Overview In this lab, you will learn how to use Python or R to manipulate and analyze

More information

2/22/ Transformations but first 1.3 Recap. Section Objectives: Students will know how to analyze graphs of functions.

2/22/ Transformations but first 1.3 Recap. Section Objectives: Students will know how to analyze graphs of functions. 1 2 3 4 1.4 Transformations but first 1.3 Recap Section Objectives: Students will know how to analyze graphs of functions. 5 Recap of Important information 1.2 Functions and their Graphs Vertical line

More information

First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion.

First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion. Warnings Linux Commands 1 First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion. Read the relevant material

More information

CS 4284 Systems Capstone

CS 4284 Systems Capstone CS 4284 Systems Capstone Disks & File Systems Godmar Back Filesystems Files vs Disks File Abstraction Byte oriented Names Access protection Consistency guarantees Disk Abstraction Block oriented Block

More information

CSCE Introduction to Computer Systems Spring 2019

CSCE Introduction to Computer Systems Spring 2019 CSCE 313-200 Introduction to Computer Systems Spring 2019 File System IV Dmitri Loguinov Texas A&M University April 9, 2019 1 Chapter 12: Roadmap 12.1 Overview 12.2 File organization 12.3 Directories 12.4

More information

Predictive Analysis: Evaluation and Experimentation. Heejun Kim

Predictive Analysis: Evaluation and Experimentation. Heejun Kim Predictive Analysis: Evaluation and Experimentation Heejun Kim June 19, 2018 Evaluation and Experimentation Evaluation Metrics Cross-Validation Significance Tests Evaluation Predictive analysis: training

More information

Memory hierarchy and cache

Memory hierarchy and cache Memory hierarchy and cache QUIZ EASY 1). What is used to design Cache? a). SRAM b). DRAM c). Blend of both d). None. 2). What is the Hierarchy of memory? a). Processor, Registers, Cache, Tape, Main memory,

More information

RATIONAL FUNCTIONS Introductory Material from Earl Please read this!

RATIONAL FUNCTIONS Introductory Material from Earl Please read this! RATIONAL FUNCTIONS Introductory Material from Earl Please read this! In working with rational functions, I tend to split them up into two types: Simple rational functions are of the form or an equivalent

More information

CS2720 Practical Software Development

CS2720 Practical Software Development Page 1 Rex Forsyth CS2720 Practical Software Development CS2720 Practical Software Development Subversion Tutorial Spring 2011 Instructor: Rex Forsyth Office: C-558 E-mail: forsyth@cs.uleth.ca Tel: 329-2496

More information

First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion.

First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion. Warnings 1 First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion. Read the relevant material in Sobell! If

More information

Table of Contents EXCEL ADD-IN CHANGE LOG VERSION (APRIL 28, 2013)... 2 Changes... 2 VERSION (FEBRUARY 20, 2013)...

Table of Contents EXCEL ADD-IN CHANGE LOG VERSION (APRIL 28, 2013)... 2 Changes... 2 VERSION (FEBRUARY 20, 2013)... Table of Contents EXCEL ADD-IN CHANGE LOG... 2 VERSION 3.4.0.0 (APRIL 28, 2013)... 2 Changes... 2 VERSION 3.3.1.1 (FEBRUARY 20, 2013)... 2 Changes... 2 Maximum number of items per query was increased to

More information

Mobile Enterprise Gateway (MEG) 2.92 FIPS Setup Guide

Mobile Enterprise Gateway (MEG) 2.92 FIPS Setup Guide Mobile Enterprise Gateway (MEG) 2.92 FIPS Setup Guide How to enable Before making changes, stop Cloud Extender (CE) and Mobile Enterprise Gateway (MEG) by running the stopmobilegateway.bat located under

More information

Files on disk are organized hierarchically in directories (folders). We will first review some basics about working with them.

Files on disk are organized hierarchically in directories (folders). We will first review some basics about working with them. 1 z 9 Files Petr Pošík Department of Cybernetics, FEE CTU in Prague EECS, BE5B33PRG: Programming Essentials, 2015 Requirements: Loops Intro Information on a computer is stored in named chunks of data called

More information

Multimedia Programming

Multimedia Programming Copyright Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See http://software-carpentry.org/license.html for more information. Data is 1's and 0's Data is 1's

More information

A programming language should not include everything anyone might ever want

A programming language should not include everything anyone might ever want Copyright Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See http://software-carpentry.org/license.html for more information. A programming language should

More information

b. Developing multiple versions of a software project in parallel

b. Developing multiple versions of a software project in parallel Multiple-Choice Questions: 1. Which of these terms best describes Git? a. Integrated Development Environment b. Distributed Version Control System c. Issue Tracking System d. Web-Based Repository Hosting

More information

SMD149 - Operating Systems - File systems

SMD149 - Operating Systems - File systems SMD149 - Operating Systems - File systems Roland Parviainen November 21, 2005 1 / 59 Outline Overview Files, directories Data integrity Transaction based file systems 2 / 59 Files Overview Named collection

More information

Microsoft Office Access 2007: Intermediate Course 01 Relational Databases

Microsoft Office Access 2007: Intermediate Course 01 Relational Databases Microsoft Office Access 2007: Intermediate Course 01 Relational Databases Slide 1 Relational Databases Course objectives Normalize tables Set relationships between tables Implement referential integrity

More information

HD RAID Configuration Mode Commands

HD RAID Configuration Mode Commands The HD RAID Configuration Mode is used to configure RAID parameters on the platform's hard disk drives. Important The commands or keywords/variables that are available are dependent on platform type, product

More information

8.0 Help for Community Managers About Jive for Google Docs...4. System Requirements & Best Practices... 5

8.0 Help for Community Managers About Jive for Google Docs...4. System Requirements & Best Practices... 5 for Google Docs Contents 2 Contents 8.0 Help for Community Managers... 3 About Jive for Google Docs...4 System Requirements & Best Practices... 5 Administering Jive for Google Docs... 6 Understanding Permissions...6

More information