Update tar command to remove absolute paths from the archive
Created by: deepakduggirala
Description
Current command create tar files with full path of the directory. Ex:
running the command tar cf /N/scratch/bioloop/foo.tar --sparse /N/project/bioloop/raw_data/test_dataset
produces a foo.tar when extracted
tar xf foo.tar
produces the below hierarchy in the directory where it was extracted.
- N/
- project/
- bioloop/
- raw_data/
- test_dataset/
- ... files/dirs of the dataset
- test_dataset/
- raw_data/
- bioloop/
- project/
tar cf /N/scratch/bioloop/foo.tar --sparse -C /N/project/bioloop/raw_data/test_dataset .
removes absolute paths from the archive and when extracted just produces:
`tar xf foo.tar
- foo/
- ... files/dirs of the dataset