The Unix File System Types of Files n















![The Brackets n n n [!0] – not zero [!a-z] – not a-z [a-np-z]* The Brackets n n n [!0] – not zero [!a-z] – not a-z [a-np-z]*](https://slidetodoc.com/presentation_image_h2/01660123e3b6e73e059db2c88104394b/image-16.jpg)

- Slides: 17
The Unix File System
Types of Files n Ordinary files n n Directory Files n n Contains data, text, program, instructions. Also known as “folders” in other operating systems. Special Files n Device files used to communicate with hardware.
Unix File. System / bin etc home lib borris natasha sherman usr bin lib
Working with Files n $ pwd n n $ ls n n the directory you are currently working on lists the files stored on your directory $ cat <argument> n examines the content based on arguments found on the file
(. Working with Files (cont n wc <argument> n counts the number of words in the argument: n n n -l counts only the number of files contained -c counts the number of characters in a file -w counts the number of words in a file
(. Working with Files (cont n cp <source> <destination> n n mv <source> <destination> n n copies the file from the <source> to <destination> used to rename a file rm <argument> n used to remove a file from the system
Directories users Steve Ruth
(. Directories (cont Steve programs Documents memos proposals letters wb plan Sys. A No. JSK dact New. hire mon collect mon
(. Directories (cont Ruth programs Documents memos proposals letters wb plan Sys. A No. JSK dact New. hire mon collect mon
Working with Directories n $ pwd n n $ cd <argument> n n prints the current working directory moves you to the directory in the argument $ cd. . n takes you one level up to the file system
Working with Directories (. (cont n $ cd <directory>/<directory> n n $ cd. . /. . n n will take you to the directory specified will take you two levels down the system $ mkdir <argument> n creates a directory in the file system
Working with Directories (. (cont n $ ln <from> <to> n n n links to files together; will not occupy twice as much disk space; will carry the changes created in one file to the other file.
Working with Directories (. (cont n $ rmdir <path> n Removes the specified directory; directory should not contain any files before it can be removed
File Name Substitution n * The asterisk n n One powerful feature of UNIX is using the asterisk. Example: cat file 1 file 2 file 3 = cat *
Matching Characters n ? The Question Mark n n The question mark is used to match the number of characters in the file Example: echo? ?
The Brackets n n n [!0] – not zero [!a-z] – not a-z [a-np-z]* - all files except 0
Thank You n Any questions?