Querying Directory Contents Copyright © The University of Edinburgh 2011 This work is licensed under the Creative Commons Attribution License See

Slides:



Advertisements
Similar presentations
Directory and File Paths Copyright © Software Carpentry and The University of Edinburgh This work is licensed under the Creative Commons Attribution.
Advertisements

Concepts about the file system 2. The disk structure 3. Files in disk – The ext2 FS 4. The Virtual File System (c) 2013, Prof. Jordi Garcia.
Tuples Copyright © Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See
Control Flow Copyright © Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See
MORE FILE ATTRIBUTES. ls –l to display file attributes (properties) Listing of a specific directory Ownership and group ownership Different file permissions.
Computer Science 111 Fundamentals of Programming I Files.
File Systems Examples.
The Unix File System. What are the three parts of every file on a Unix filesystem? And where is each stored? Filename - stored in directories Inode -
File System Interface CSCI 444/544 Operating Systems Fall 2008.
Linux+ Guide to Linux Certification, Second Edition
6/24/2015B.RamamurthyPage 1 File System B. Ramamurthy.
7/15/2015B.RamamurthyPage 1 File System B. Ramamurthy.
Introduction to Linux and Shell Scripting Jacob Chan.
Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems David Goldschmidt, Ph.D.
Computer Studies (AL) File Management File system interface.
CSC 322 Operating Systems Concepts Lecture - 4: by Ahmed Mumtaz Mustehsan Special Thanks To: Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
Silberschatz, Galvin and Gagne  Operating System Concepts File Concept Contiguous logical address space Smallest user allocation Non-volatile.
Fixtures Copyright © Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See
Linux+ Guide to Linux Certification, Second Edition
H3D API Training  Part 3.1: Python – Quick overview.
File Systems CSCI What is a file? A file is information that is stored on disks or other external media.
Linux Operations and Administration
Lesson 9-Setting and Using Permissions. Overview Describing file permissions. Using execute permissions with a file. Changing file permissions using mnemonics.
File Systems (1). Readings r Reading: Disks, disk scheduling (3.7 of textbook; “How Stuff Works”) r Reading: File System Implementation ( of textbook)
Browsing Directories Copyright © Software Carpentry and The University of Edinburgh This work is licensed under the Creative Commons Attribution.
Managing Files. Module 5 Managing Files ♦ Introduction “On a Linux system, everything is a file; if something is not a file, it is a process.” ♦ Topics.
Files and Directories Copyright © Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See
Interface and Implementation Copyright © Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See
Files & File system. A Possible File System Layout Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved
(A Very Short) Introduction to Shell Scripts CSCI N321 – System and Network Administration Copyright © 2000, 2003 by Scott Orr and the Trustees of Indiana.
Computer Science Lecture 19, page 1 CS677: Distributed OS Last Class: Fault tolerance Reliable communication –One-one communication –One-many communication.
Project 6 Unix File System. Administrative No Design Review – A design document instead 2-3 pages max No collaboration with peers – Piazza is for clarifications.
Navigating Directories
IST 222 Day 3. Homework for Today Take up homework and go over Go to Microsoft website and check out their hardware compatibility list.
Linux+ Guide to Linux Certification, Third Edition
Linux+ Guide to Linux Certification, Third Edition
Introduction Copyright © Software Carpentry This work is licensed under the Creative Commons Attribution License See
CE Operating Systems Lecture 17 File systems – interface and implementation.
First-Class Functions Copyright © Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See
Python – reading and writing files. ??? ???two ways to open a file open and file ??? How to write to relative and absolute paths?
Managing Files CSCI N321 – System and Network Administration Copyright © 2000, 2007 by the Trustees of Indiana University except as noted.
Today’s topic Access and manipulate meta data for files –File type, ownership, access permissions, access time, etc How to determine if a file is not there?
File Systems. 2 What is a file? A repository for data Is long lasting (until explicitly deleted).
Linux File system Implementations
CIT 383: Administrative ScriptingSlide #1 CIT 383: Administrative Scripting Directories.
Exceptions Copyright © Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See
The If Statement There are no switch statements in Python. You need to use just if statements. There are no switch statements in Python. You need to use.
Lecture Topics: 11/29 File System Interface –Files and Directories –Access Methods –Protection –Consistency.
ITFN 2601 Introduction to Operating Systems Lecture 22 Files & Directories.
Manipulating Directories and Files Copyright © The University of Edinburgh 2011 This work is licensed under the Creative Commons Attribution License See.
Today… Strings: –String Methods Demo. Raising Exceptions. os Module Winter 2016CISC101 - Prof. McLeod1.
W4118 Operating Systems Instructor: Junfeng Yang.
COMP 3500 Introduction to Operating Systems Directory Structures Block Management Dr. Xiao Qin Auburn University
Linux Filesystem Management
Day 28 File System.
File-System Management
File System Interface CSSE 332 Operating Systems
Chapter 13: File-System Interface
Sets and Dictionaries Examples Copyright © Software Carpentry 2010
Day 27 File System.
File Structure 2018, Spring Pusan National University Joon-Seok Kim
File System B. Ramamurthy B.Ramamurthy 11/27/2018.
Fundamentals of Programming I Files
Winter 2018 CISC101 12/5/2018 CISC101 Reminders
Advanced UNIX progamming
Files Management – The interfacing
Chien-Chung Shen CIS, UD
File Management System Simulation
Python Modules.
Browsing Directories Using walk
Presentation transcript:

Querying Directory Contents Copyright © The University of Edinburgh 2011 This work is licensed under the Creative Commons Attribution License See for more information. Python

Querying Directory Contents We know how to move around directories

PythonQuerying Directory Contents We know how to move around directories And how to list what’s in directories

PythonQuerying Directory Contents We know how to move around directories And how to list what’s in directories How do we

PythonQuerying Directory Contents We know how to move around directories And how to list what’s in directories How do we –Check whether a file exists

PythonQuerying Directory Contents We know how to move around directories And how to list what’s in directories How do we –Check whether a file exists –Tell apart a file and a directory

PythonQuerying Directory Contents We know how to move around directories And how to list what’s in directories How do we –Check whether a file exists –Tell apart a file and a directory –See if two variables refer to the same directory

PythonQuerying Directory Contents We know how to move around directories And how to list what’s in directories How do we –Check whether a file exists –Tell apart a file and a directory –See if two variables refer to the same directory – Check that we are allowed to delete a file

PythonQuerying Directory Contents We know how to move around directories And how to list what’s in directories How do we –Check whether a file exists –Tell apart a file and a directory –See if two variables refer to the same directory – Check that we are allowed to delete a file – Get the size of a file

PythonQuerying Directory Contents >>> from os import exists pizza.cfg notes.txt solar vladusers

PythonQuerying Directory Contents >>> from os import exists >>> exists('pizza.cfg') pizza.cfg notes.txt solar vladusers

PythonQuerying Directory Contents >>> from os import exists >>> exists('pizza.cfg') True pizza.cfg notes.txt solar vladusers

PythonQuerying Directory Contents >>> from os import exists >>> exists('pizza.cfg') True >>> exists('/users/vlad/pizza.cfg') pizza.cfg notes.txt solar vladusers

PythonQuerying Directory Contents >>> from os import exists >>> exists('pizza.cfg') True >>> exists('/users/vlad/pizza.cfg') True pizza.cfg notes.txt solar vladusers

PythonQuerying Directory Contents >>> from os import exists >>> exists('pizza.cfg') True >>> exists('/users/vlad/pizza.cfg') True >>> exists('solar') pizza.cfg notes.txt solar vladusers

PythonQuerying Directory Contents >>> from os import exists >>> exists('pizza.cfg') True >>> exists('/users/vlad/pizza.cfg') True >>> exists('solar') True pizza.cfg notes.txt solar vladusers

PythonQuerying Directory Contents >>> from os import exists >>> exists('pizza.cfg') True >>> exists('/users/vlad/pizza.cfg') True >>> exists('solar') True >>> exists('/users/vlad/solar') pizza.cfg notes.txt solar vladusers

PythonQuerying Directory Contents >>> from os import exists >>> exists('pizza.cfg') True >>> exists('/users/vlad/pizza.cfg') True >>> exists('solar') True >>> exists('/users/vlad/solar') True pizza.cfg notes.txt solar vladusers

PythonQuerying Directory Contents >>> from os import exists >>> exists('pizza.cfg') True >>> exists('/users/vlad/pizza.cfg') True >>> exists('solar') True >>> exists('/users/vlad/solar') True >>> exists('no-such-file') pizza.cfg notes.txt solar vladusers

PythonQuerying Directory Contents >>> from os import exists >>> exists('pizza.cfg') True >>> exists('/users/vlad/pizza.cfg') True >>> exists('solar') True >>> exists('/users/vlad/solar') True >>> exists('no-such-file') False pizza.cfg notes.txt solar vladusers

PythonQuerying Directory Contents >>> from os import exists >>> exists('pizza.cfg') True >>> exists('/users/vlad/pizza.cfg') True >>> exists('solar') True >>> exists('/users/vlad/solar') True >>> exists('no-such-file') False >>> exists('/users/vlad/no-such-thing') pizza.cfg notes.txt solar vladusers

PythonQuerying Directory Contents >>> from os import exists >>> exists('pizza.cfg') True >>> exists('/users/vlad/pizza.cfg') True >>> exists('solar') True >>> exists('/users/vlad/solar') True >>> exists('no-such-file') False >>> exists('/users/vlad/no-such-thing') False pizza.cfg notes.txt solar vladusers

PythonQuerying Directory Contents >>> from os import isfile, isdir pizza.cfg notes.txt solar vladusers

PythonQuerying Directory Contents >>> from os import isfile, isdir >>> isfile('pizza.cfg') pizza.cfg notes.txt solar vladusers

PythonQuerying Directory Contents >>> from os import isfile, isdir >>> isfile('pizza.cfg') True pizza.cfg notes.txt solar vladusers

PythonQuerying Directory Contents >>> from os import isfile, isdir >>> isfile('pizza.cfg') True >>> isfile('solar') pizza.cfg notes.txt solar vladusers

PythonQuerying Directory Contents >>> from os import isfile, isdir >>> isfile('pizza.cfg') True >>> isfile('solar') False pizza.cfg notes.txt solar vladusers

PythonQuerying Directory Contents >>> from os import isfile, isdir >>> isfile('pizza.cfg') True >>> isfile('solar') False >>> isfile('no-such-file') pizza.cfg notes.txt solar vladusers

PythonQuerying Directory Contents >>> from os import isfile, isdir >>> isfile('pizza.cfg') True >>> isfile('solar') False >>> isfile('no-such-file') False pizza.cfg notes.txt solar vladusers

PythonQuerying Directory Contents >>> from os import isfile, isdir >>> isfile('pizza.cfg') True >>> isfile('solar') False >>> isfile('no-such-file') False >>> isdir('solar') pizza.cfg notes.txt solar vladusers

PythonQuerying Directory Contents >>> from os import isfile, isdir >>> isfile('pizza.cfg') True >>> isfile('solar') False >>> isfile('no-such-file') False >>> isdir('solar') True pizza.cfg notes.txt solar vladusers

PythonQuerying Directory Contents >>> from os import isfile, isdir >>> isfile('pizza.cfg') True >>> isfile('solar') False >>> isfile('no-such-file') False >>> isdir('solar') True >>> isdir('pizza.cfg') pizza.cfg notes.txt solar vladusers

PythonQuerying Directory Contents >>> from os import isfile, isdir >>> isfile('pizza.cfg') True >>> isfile('solar') False >>> isfile('no-such-file') False >>> isdir('solar') True >>> isdir('pizza.cfg') False pizza.cfg notes.txt solar vladusers

PythonQuerying Directory Contents >>> from os import isfile, isdir >>> isfile('pizza.cfg') True >>> isfile('solar') False >>> isfile('no-such-file') False >>> isdir('solar') True >>> isdir('pizza.cfg') False >>> isdir('no-such-dir') pizza.cfg notes.txt solar vladusers

PythonQuerying Directory Contents >>> from os import isfile, isdir >>> isfile('pizza.cfg') True >>> isfile('solar') False >>> isfile('no-such-file') False >>> isdir('solar') True >>> isdir('pizza.cfg') False >>> isdir('no-such-dir') False pizza.cfg notes.txt solar vladusers

PythonQuerying Directory Contents >>> def check(path):... if isfile(path):... print "It's a file"... elif isdir(path):... print "It's a directory"... else:... print "It doesn't exist"...

PythonQuerying Directory Contents >>> def check(path):... if isfile(path):... print "It's a file"... elif isdir(path):... print "It's a directory"... else:... print "It doesn't exist"...

PythonQuerying Directory Contents >>> def check(path):... if isfile(path):... print "It's a file"... elif isdir(path):... print "It's a directory"... else:... print "It doesn't exist"...

PythonQuerying Directory Contents >>> def check(path):... if isfile(path):... print "It's a file"... elif isdir(path):... print "It's a directory"... else:... print "It doesn't exist"...

PythonQuerying Directory Contents >>> def check(path):... if isfile(path):... print "It's a file"... elif isdir(path):... print "It's a directory"... else:... print "It doesn't exist"... >>> check('/users/vlad/pizza.cfg') pizza.cfg notes.txt solar vladusers

PythonQuerying Directory Contents >>> def check(path):... if isfile(path):... print "It's a file"... elif isdir(path):... print "It's a directory"... else:... print "It doesn't exist"... >>> check('/users/vlad/pizza.cfg') It's a file pizza.cfg notes.txt solar vladusers

PythonQuerying Directory Contents >>> def check(path):... if isfile(path):... print "It's a file"... elif isdir(path):... print "It's a directory"... else:... print "It doesn't exist"... >>> check('/users/vlad/pizza.cfg') It's a file >>> check('/users/vlad/solar') pizza.cfg notes.txt solar vladusers

PythonQuerying Directory Contents >>> def check(path):... if isfile(path):... print "It's a file"... elif isdir(path):... print "It's a directory"... else:... print "It doesn't exist"... >>> check('/users/vlad/pizza.cfg') It's a file >>> check('/users/vlad/solar') It's a directory pizza.cfg notes.txt solar vladusers

PythonQuerying Directory Contents >>> def check(path):... if isfile(path):... print "It's a file"... elif isdir(path):... print "It's a directory"... else:... print "It doesn't exist"... >>> check('/users/vlad/pizza.cfg') It's a file >>> check('/users/vlad/solar') It's a directory >>> check('/users/vlad/no-such-file') pizza.cfg notes.txt solar vladusers

PythonQuerying Directory Contents >>> def check(path):... if isfile(path):... print "It's a file"... elif isdir(path):... print "It's a directory"... else:... print "It doesn't exist"... >>> check('/users/vlad/pizza.cfg') It's a file >>> check('/users/vlad/solar') It's a directory >>> check('/users/vlad/no-such-file') It doesn't exist pizza.cfg notes.txt solar vladusers

PythonQuerying Directory Contents >>> from os.path import samefile pizza.cfg notes.txt solar vladusers

PythonQuerying Directory Contents >>> from os.path import samefile >>> file1 = 'pizza.cfg' >>> file2 = '/users/vlad/pizza.cfg' >>> file3 = 'notes.txt' pizza.cfg notes.txt solar vladusers file3file1file2

PythonQuerying Directory Contents >>> from os.path import samefile >>> file1 = 'pizza.cfg' >>> file2 = '/users/vlad/pizza.cfg' >>> file3 = 'notes.txt' >>> samefile(file1, file2) pizza.cfg notes.txt solar vladusers file1file2file3

PythonQuerying Directory Contents >>> from os.path import samefile >>> file1 = 'pizza.cfg' >>> file2 = '/users/vlad/pizza.cfg' >>> file3 = 'notes.txt' >>> samefile(file1, file2) True pizza.cfg notes.txt solar vladusers file3file1file2

PythonQuerying Directory Contents >>> from os.path import samefile >>> file1 = 'pizza.cfg' >>> file2 = '/users/vlad/pizza.cfg' >>> file3 = 'notes.txt' >>> samefile(file1, file2) True >>> samefile(file1, file3) pizza.cfg notes.txt solar vladusers file3file1file2

PythonQuerying Directory Contents >>> from os.path import samefile >>> file1 = 'pizza.cfg' >>> file2 = '/users/vlad/pizza.cfg' >>> file3 = 'notes.txt' >>> samefile(file1, file2) True >>> samefile(file1, file3) False pizza.cfg notes.txt solar vladusers file2file3file1

PythonQuerying Directory Contents >>> from os import access

PythonQuerying Directory Contents >>> from os import access >>> from os import F_OK, R_OK, W_OK, X_OK

PythonQuerying Directory Contents >>> from os import access >>> from os import F_OK, R_OK, W_OK, X_OK >>> access('pizza.cfg', F_OK) Does the path exist?

PythonQuerying Directory Contents >>> from os import access >>> from os import F_OK, R_OK, W_OK, X_OK >>> access('pizza.cfg', F_OK) True Does the path exist?

PythonQuerying Directory Contents >>> from os import access >>> from os import F_OK, R_OK, W_OK, X_OK >>> access('pizza.cfg', F_OK) True >>> access('pizza.cfg', R_OK) Can it be read?

PythonQuerying Directory Contents >>> from os import access >>> from os import F_OK, R_OK, W_OK, X_OK >>> access('pizza.cfg', F_OK) True >>> access('pizza.cfg', R_OK) True Can it be read?

PythonQuerying Directory Contents >>> from os import access >>> from os import F_OK, R_OK, W_OK, X_OK >>> access('pizza.cfg', F_OK) True >>> access('pizza.cfg', R_OK) True >>> access('pizza.cfg', W_OK) Can it be written?

PythonQuerying Directory Contents >>> from os import access >>> from os import F_OK, R_OK, W_OK, X_OK >>> access('pizza.cfg', F_OK) True >>> access('pizza.cfg', R_OK) True >>> access('pizza.cfg', W_OK) True Can it be written?

PythonQuerying Directory Contents >>> from os import access >>> from os import F_OK, R_OK, W_OK, X_OK >>> access('pizza.cfg', F_OK) True >>> access('pizza.cfg', R_OK) True >>> access('pizza.cfg', W_OK) True >>> access('pizza.cfg', X_OK) Can it be executed?

PythonQuerying Directory Contents >>> from os import access >>> from os import F_OK, R_OK, W_OK, X_OK >>> access('pizza.cfg', F_OK) True >>> access('pizza.cfg', R_OK) True >>> access('pizza.cfg', W_OK) True >>> access('pizza.cfg', X_OK) False Can it be executed?

PythonQuerying Directory Contents >>> from os import access >>> from os import F_OK, R_OK, W_OK, X_OK >>> access('pizza.cfg', F_OK) True >>> access('pizza.cfg', R_OK) True >>> access('pizza.cfg', W_OK) True >>> access('pizza.cfg', X_OK) False >>> access('pizza.cfg', os.R_OK | os.W_OK)

PythonQuerying Directory Contents >>> from os import access >>> from os import F_OK, R_OK, W_OK, X_OK >>> access('pizza.cfg', F_OK) True >>> access('pizza.cfg', R_OK) True >>> access('pizza.cfg', W_OK) True >>> access('pizza.cfg', X_OK) False >>> access('pizza.cfg', os.R_OK | os.W_OK) True

PythonQuerying Directory Contents >>> from os import access >>> from os import F_OK, R_OK, W_OK, X_OK >>> access('pizza.cfg', F_OK) True >>> access('pizza.cfg', R_OK) True >>> access('pizza.cfg', W_OK) True >>> access('pizza.cfg', X_OK) False >>> access('pizza.cfg', os.R_OK | os.W_OK) True >>> access('pizza.cfg', os.R_OK | os.X_OK)

PythonQuerying Directory Contents >>> from os import access >>> from os import F_OK, R_OK, W_OK, X_OK >>> access('pizza.cfg', F_OK) True >>> access('pizza.cfg', R_OK) True >>> access('pizza.cfg', W_OK) True >>> access('pizza.cfg', X_OK) False >>> access('pizza.cfg', os.R_OK | os.W_OK) True >>> access('pizza.cfg', os.R_OK | os.X_OK) False

PythonQuerying Directory Contents >>> from os import access >>> from os import F_OK, R_OK, W_OK, X_OK >>> access('pizza.cfg', F_OK) True >>> access('pizza.cfg', R_OK) True >>> access('pizza.cfg', W_OK) True >>> access('pizza.cfg', X_OK) False >>> access('pizza.cfg', os.R_OK | os.W_OK) True >>> access('pizza.cfg', os.R_OK | os.X_OK) False >>> access('pizza.cfg', os.F_OK | os.R_OK | os.W_OK)

PythonQuerying Directory Contents >>> from os import access >>> from os import F_OK, R_OK, W_OK, X_OK >>> access('pizza.cfg', F_OK) True >>> access('pizza.cfg', R_OK) True >>> access('pizza.cfg', W_OK) True >>> access('pizza.cfg', X_OK) False >>> access('pizza.cfg', os.R_OK | os.W_OK) True >>> access('pizza.cfg', os.R_OK | os.X_OK) False >>> access('pizza.cfg', os.F_OK | os.R_OK | os.W_OK) True

PythonQuerying Directory Contents >>> from os import stat >>> info = stat('pizza.cfg')

PythonQuerying Directory Contents >>> from os import stat >>> info = stat('pizza.cfg') >>> print info (33188, 5557L, L, 1, 3946, 4000, 8172L, , , ) stat returns a record

PythonQuerying Directory Contents >>> from os import stat >>> info = stat('pizza.cfg') >>> print info (33188, 5557L, L, 1, 3946, 4000, 8172L, , , ) >>> print info.st_mode Protection bits

PythonQuerying Directory Contents >>> from os import stat >>> info = stat('pizza.cfg') >>> print info (33188, 5557L, L, 1, 3946, 4000, 8172L, , , ) >>> print info.st_mode >>> print info.st_ino 5557 Inode number

PythonQuerying Directory Contents >>> from os import stat >>> info = stat('pizza.cfg') >>> print info (33188, 5557L, L, 1, 3946, 4000, 8172L, , , ) >>> print info.st_mode >>> print info.st_ino 5557 >>> print info.st_dev Device

PythonQuerying Directory Contents >>> from os import stat >>> info = stat('pizza.cfg') >>> print info (33188, 5557L, L, 1, 3946, 4000, 8172L, , , ) >>> print info.st_mode >>> print info.st_ino 5557 >>> print info.st_dev >>> print info.st_nlink 1 Number of hard links

PythonQuerying Directory Contents >>> from os import stat >>> info = stat('pizza.cfg') >>> print info (33188, 5557L, L, 1, 3946, 4000, 8172L, , , ) >>> print info.st_mode >>> print info.st_ino 5557 >>> print info.st_dev >>> print info.st_nlink 1 >>> print info.st_uid 3946 Owner’s user ID

PythonQuerying Directory Contents >>> print info.st_gid 4000 Owner’s group ID

PythonQuerying Directory Contents >>> print info.st_gid 4000 >>> print info.st_size 8172 File size in bytes

PythonQuerying Directory Contents >>> print info.st_gid 4000 >>> print info.st_size 8172 >>> print info.st_atime Most recent access time

PythonQuerying Directory Contents >>> print info.st_gid 4000 >>> print info.st_size 8172 >>> print info.st_atime >>> print info.st_mtime Most recent modification

PythonQuerying Directory Contents >>> print info.st_gid 4000 >>> print info.st_size 8172 >>> print info.st_atime >>> print info.st_mtime >>> print info.st_ctime Most recent metadata change time for Linux or, creation time for Windows

PythonQuerying Directory Contents >>> print info.st_gid 4000 >>> print info.st_size 8172 >>> print info.st_atime >>> print info.st_mtime >>> print info.st_ctime >>> from os import stat_float_times >>> stat_float_times() False Owner’s group ID File size in bytes Most recent access time Most recent modification Most recent metadata change time for Linux or, creation time for Windows

PythonQuerying Directory Contents A stat record may contain operating system-specific values

PythonQuerying Directory Contents >>> print info.st_blocks 17 A stat record may contain operating system-specific values Number of blocks, for Linux

PythonQuerying Directory Contents >>> print info.st_blocks 17 >>> print info.st_blksize 8192 A stat record may contain operating system-specific values File system block size for Linux

PythonQuerying Directory Contents os.path Common pathname manipulations exists Does the given path exist? isfile Is the given path a file? isdir Is the given path a directory? samefile Are the given arguments paths to the same file or directory? os Miscellaneous operating system interfaces access Can the file/directory be accessed? statGet operating system-specific information

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