The system administrator performs tasks such as handling various files, directories, and data. In this chapter, we will learn about the os module. The os module provides the functionality to interact with the operating system. Python programmers can easily use this os module for performing file and directory operations. The os module provides tools for programmers that deal with files, paths, directories, and data.
In this chapter, you will learn about the following:
- Using the os module to work with directories
- Copying, moving, renaming, and deleting data
- Working with paths, directories, and files
- Comparing data
- Merging data
- Pattern matching files and directories
- Metadata: data about data
- Compressing and restoring
- Using a tarfile module to create TAR archives
- Using a tarfile module to examine the contents of TAR files