Concept Flow - tar (create and extract archives)
Start
Choose Action
Create Archive
Run tar with -c
Archive Created
End
The flow shows choosing to create or extract an archive using tar, running the command, then finishing.
tar -cvf archive.tar file1.txt file2.txt tar -xvf archive.tar
| Step | Command | Action | Output | Result |
|---|---|---|---|---|
| 1 | tar -cvf archive.tar file1.txt file2.txt | Create archive named archive.tar | file1.txt file2.txt | archive.tar created with 2 files |
| 2 | tar -xvf archive.tar | Extract files from archive.tar | file1.txt file2.txt | file1.txt and file2.txt extracted |
| 3 | End | No more commands | Process complete |
| Variable | Start | After Step 1 | After Step 2 | Final |
|---|---|---|---|---|
| archive.tar | does not exist | created with file1.txt and file2.txt | exists | exists |
| file1.txt | exists | exists | exists | exists |
| file2.txt | exists | exists | exists | exists |
tar command creates or extracts archives. Use -c to create, -x to extract. Use -f to specify archive file name. -v shows files being processed. Example: tar -cvf archive.tar files Example: tar -xvf archive.tar