《aix系统应用基础》04filesandd.ppt
《《aix系统应用基础》04filesandd.ppt》由会员分享,可在线阅读,更多相关《《aix系统应用基础》04filesandd.ppt(25页珍藏版)》请在三一办公上搜索。
1、 Copyright IBM Corporation 2008,Unit 4 Files and Directories,Copyright IBM Corporation 2008,Unit Objectives,After completing this unit,you should be able to:Describe the different file typesDescribe the AIX file system structureUse full and relative path names in a file specificationCreate,delete,an
2、d list directoriesUse the touch command to create an empty file,Copyright IBM Corporation 2008,A File,A file is:A collection of dataA stream of characters or a byte streamNo structure is imposed on a file by the operating system,Copyright IBM Corporation 2008,File Types,Ordinary:Text or code dataDir
3、ectory:A table of contents,that stores a list of files within thatdirectorySpecial Files:Represent hardware or logical devicesExample:The CD-ROM device is accessed via the/dev/cd0 file.,Copyright IBM Corporation 2008,#,type,mode,links,user,group,date,size,loc,4,dir,755,2,team01,staff,July 10 10:15,5
4、12,10,file,644,1,team01,staff,July 11 11:00,96,name,i-node,subdir1,4,myfile,10,Directory,i-node Table,Data,$vi myfile,Directory Contents,Copyright IBM Corporation 2008,AIX File Systems,Refers to both the physical and logical storage and access of files.In AIX,a file system is an allocation of storag
5、e.Similar in concept to partitions in the PC environment.Allows the operating system to store and retrieve the data from files quickly and efficiently.To access file systems,we associate them with a directory.AIX has several pre-defined file systems:/(root)/tmp/usr/opt/var/home/proc,Copyright IBM Co
6、rporation 2008,/,usr,dev,home,sbin,etc,var,tty1lp0,suba,.profilemanualstest1,mon_reporttrio_ltrwalrus,team01,team02,team03,test,c,doc,c,reports,pgms,bin,proc,tmp,opt,Hierarchical Structure,Copyright IBM Corporation 2008,Path Names,A sequence of names,separated by slashes(/),that describes the path t
7、he system must follow to locate a file in the file system.There are two types of path names:Absolute or Full Path Name(start from the/directory):Relative Path Name(start from current directory):,$vi/home/team01/doc/mon_report$/usr/bin/ls l/home/team01,$cd/home/team01$vi doc/mon_report$cd/usr/bin$./l
8、s l/home/team01,Copyright IBM Corporation 2008,Where Am I?,The print working directory command can be used to find out what your current directory is:,$pwd/home/team01,Copyright IBM Corporation 2008,Common options:-a:Show hidden files(files that start with a“.”)-R:List files in all subdirectories(re
9、cursively),Syntax:ls directory,Listing Directories,$lsc doc manuals test1$ls a.profile c doc manuals test1$ls Rc doc manuals test1./c:./doc:Mon_report trio_ltr walrus,Copyright IBM Corporation 2008,The ls command with the-l option can be used to obtain more information about the files in a directory
10、.,Long Listing of Files,$ls ltotal 5drwxrwxr-x2 team01 staff 1024 Aug 12 10:16cdrwxrwxr-x2 team01 staff 512 Feb 18 09:55doc-rwxrwxr-x1 team01 staff 320 Feb 22 07:30suba-rwxrwxr-x2 team01 staff 144 Feb 22 16:30test1$ls li test129-rwxrwxr-x 2 team01 staff 144 Feb 22 16:30 test1,Copyright IBM Corporati
11、on 2008,Set the current working directory from/home/team01 to/home/team01/doc:Set your working directory to your home directory:Set your working directory to the parent directory:,Syntax:cd directory,Change Current Directory,$cd docrelative path$cd/home/team01/docfull path,$cd,$cd.,Copyright IBM Cor
12、poration 2008,Activity:Q+A,How can you determine the i-node number of a file?Where are the names and i-node numbers of files stored?How can you determine your current directory?How can you list all files in a directory,including hidden files?Your current directory is/usr/dt/bin.What is the easiest w
13、ay to change to your home directory?Which file names are relative(check all that apply)?./team03/dir1/tmp/file1/.profile./.profileWrite down the three different file types that AIX knows:,Copyright IBM Corporation 2008,To create the directory test,as a sub-directory of/home/team01:(or),Syntax:mkdir
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- aix系统应用基础 aix 系统 应用 基础 04 filesandd

链接地址:https://www.31ppt.com/p-5896020.html