|
# How to Merge and Extract Split tar.xz Files |
|
|
|
Follow these steps to combine and extract your split alibaba_dataset files. |
|
|
|
## Step 1: Download All Parts |
|
First, ensure all split parts are downloaded to the same directory: |
|
``` |
|
alibaba_dataset_part_aa |
|
alibaba_dataset_part_ab |
|
alibaba_dataset_part_ac |
|
alibaba_dataset_part_ad |
|
alibaba_dataset_part_ae |
|
alibaba_dataset_part_af |
|
alibaba_dataset_part_ag |
|
``` |
|
|
|
## Step 2: Merge the Split Files |
|
Use the `cat` command to concatenate all parts in the correct order: |
|
|
|
```bash |
|
cat alibaba_dataset_part_* > alibaba_dataset.tar.xz |
|
``` |
|
|
|
This command combines all parts into a single file named `alibaba_dataset.tar.xz`. |
|
|
|
## Step 3: Verify the Merged File |
|
Check that the merged file was created successfully: |
|
|
|
```bash |
|
ls -lh alibaba_dataset.tar.xz |
|
``` |
|
|
|
The file size should be approximately 500GB (the sum of all parts). |
|
|
|
## Step 4: Extract the tar.xz Archive |
|
Use the `tar` command with appropriate flags: |
|
|
|
```bash |
|
tar -xf alibaba_dataset.tar.xz |
|
``` |
|
|
|
For progress visibility, add the verbose flag: |
|
|
|
```bash |
|
tar -xvf alibaba_dataset.tar.xz |
|
``` |
|
|
|
## Step 5: Verify Extraction |
|
Once extraction is complete, check the extracted contents: |
|
|
|
```bash |
|
ls -la |
|
``` |
|
|
|
## Memory-Efficient Options |
|
|
|
If disk space is limited, extract directly without saving the merged file: |
|
|
|
```bash |
|
cat alibaba_dataset_part_* | tar -xJ |
|
``` |
|
|
|
For large archives that cause memory issues: |
|
|
|
```bash |
|
tar --use-compress-program="xz -d" -xf alibaba_dataset.tar.xz |
|
``` |
|
|
|
This approach may handle very large archives more efficiently. |