File Management  «Prev  Next»
Lesson 1

File Management in Unix

Before beginning this course you should be comfortable with the following concepts.
  1. Using the ls command to list files
  2. Using wildcards (*, ?, and []) to create an efficient shorthand system for specifying file names
  3. How to copy, move, or remove files using cp, mv, or rm
  4. How to create or remove directories using mkdir and rmdir

File Management Tasks

This module will discuss advanced file management tasks. By the end of this module, you will be able to:
  1. List files recursively and list hidden files
  2. Copy a directory
  3. Remove a directory tree
  4. Create a link
  5. Find files on the system

File Based Concepts

To gain a full picture of the internal operation of filesystems, it is necessary to understand what the user sees, why things are presented the way they are, and what the main concepts are. This module provides an introduction to basic file concepts. Users new to UNIX and those starting to program in the UNIX environment will find these concepts useful. A basic implementation of the
ls program 
helps to reinforce the material presented and provides an introduction to file-related libraries and system calls, a topic that will be expanded upon in the next module. One peculiarity that UNIX introduced was the notion that everything in the UNIX namespace (file tree) is visible as a file and that the same operations can be applied to all file types. Thus one can open and read a directory in the same way in which a file can be opened and read. Of course, this does not always have the desired effect. For example, running the UNIX command cat on a directory will likely produce a screen full of unreadable characters. However, these and other simple concepts are one of the great strengths of UNIX. The following sections provide introductory material which describe file-based concepts and start to paint a picture of how these components fit together.
In the next lesson, advanced ways to list files using the ls command will be discussed.
Unix OS Design