Skip to main content
Commonmark migration
Source Link

use the --directory option from man tar :

-C,- -directory DIR

 

change to directory DIR

i.e.:

tar -C /mnt/sdb1/ -czf /mnt/sdb1/old_files/new.tar.gz myfile.csv 

use the --directory option from man tar :

-C,- -directory DIR

 

change to directory DIR

i.e.:

tar -C /mnt/sdb1/ -czf /mnt/sdb1/old_files/new.tar.gz myfile.csv 

use the --directory option from man tar :

-C,- -directory DIR

change to directory DIR

i.e.:

tar -C /mnt/sdb1/ -czf /mnt/sdb1/old_files/new.tar.gz myfile.csv 
Source Link
FelixJN
  • 14.1k
  • 2
  • 36
  • 55

use the --directory option from man tar :

-C,- -directory DIR

change to directory DIR

i.e.:

tar -C /mnt/sdb1/ -czf /mnt/sdb1/old_files/new.tar.gz myfile.csv