Lesson 4: The UNIX/Linux File System
Objectives
- Demonstrate knowledge of the Unix directory hierarchy by locating and listing
files within the directory structure
- Know how to navigate the directory hierarchy using the cd and ls commands
- Know the three elements of a file and why each is necessary
- Be able to use appropriate Unix commands to view the type and content of
files
- The UNIX Directory Hierarchy
- The root directory: (/)
Contains a list of subdirectory names under which all files may be accessed.
- Absolute pathnames: Fully specified names starting from /
/home/CIS90/guest
- Relative pathnames: A file name starting relative to the current working directory:
Poems/Shakespeare/sonnet1
- Navigating the file system
- The cd command
- The pwd command
- The ls command
- File Types:
- Directory
- Ordinary
- Device
- Symbolic Links (short-cuts)
The file command
- Viewing Files
- Text files:
- The cat command,
- The more and less commands,
- The head and tail commands
- Data files: