#Welcome to My Tar
Task
The task is to recreate a version of the Tar (Tape Archive) utility (my_tar). My_tar's functionalities are mirrored after the GNU tar program.
Description
The Tar utility is used for collecting files (archive members) into an archive file. The modes for my_tar are as follows:
-
-c: creating a new archive
-
-r: appending a new archive member to an existing archive or creating a new archive if the specified archive does not exist
-
-u: update an existing archive member if its modification date is newer than that of its corresponding archive member.
-
-t: list tar archive file's contents
-
-x: Extract to disk from the archive file
Installation
The executable program is my_tar. The required files are in the Program Dependencies section.
Program Dependencies
Usage
-c Create an archive
- ./my_tar -cf [tar_file]
- ./my_tar -cf [tar_file] [item1, item2, ...]
-t List archive contents
- ./my_tar -tf [tar_file]
-r Append archive members
- ./my_tar -rf [non-existent file]
- ./my_tar -rf [non-existent file] [non-existent file]
- ./my_tar -rf [non-existent file] [non-existent file]
- ./my_tar -rf [non-existent file] [existing file]
- ./my_tar -rf [existing file] [existing file]
- ./my_tar -rf [existing file]
-u Update archive
Usage is the same as -r mode with the additional functions:
- ./my_tar -uf [existing tar file] [newer entry]
- ./my_tar -uf [existing tar file] [newer entry] [same newer entry]
-x Extract archive
- ./my_tar -tf [tar file]
- ./mY-tar -tf [tar file] [tar_file file1, tar_file file2, ...]
Things to Improve
-
Handle duplicate specified files
-
Make specified directories to be extracted '/' agnostic
-
List specified archive member
The Core Team
Ricky Liu
Yaroslav Pakhaliuk