.sp 0.4i .ft B .tl 'CSCI-E28'Lecture 4'Outline' \l'6.5i' .nf .in +1i .ta 1i +1.5i \fBTopics\fR: Internal Structure of Files, Directories, File Systems \fBApproach\fR: Work from user view to system view, write pwd \fBFeatured Commands\fR: mkdir, rmdir, rm, ln, mv, pwd \fBMain Ideas\fR: Users see a file system as a tree of directories, files, and info A file system is a sequence of disk blocks A file is a struct of info (an inode) and a list of data blocks A directory is a list of inode numbers and names \fBAgenda\fR Intro What does it mean to be in a directory? Write pwd. One tree - multiple disks How do several disks appear as a single tree of directories? errno and perror() and strerror() system calls return -1 on error; what's the problem? User View of File System directory tree, files, info, moving around, moving files mkdir abuse (don't try this at home) Face Reality A disk is a stack of platters, tracks, sectors, just blocks The Unix File System Three (well, four) parts Inodes and Device ID Identifying each item in a tree Looking at Operations in terms of a Unix File System Creating a file Building a Tree File operations: rm, ln, mv, mkdir, rmdir Writing pwd inodes and names [Symbolic Links -- if time Definition, Examples, Directories, cross-system]