Ubuntu_16.04 [SOLVED]: tar compress with -C argument doesn't work Home › Forums › Ubuntu 16.04 › Ubuntu_16.04 [SOLVED]: tar compress with -C argument doesn't work Tagged: compression, tar, ubuntu-16.04 Viewing 2 posts - 1 through 2 (of 2 total) Author Posts December 31, 2017 at 2:37 am #36824 Anonymous Question This set of commands aren’t working as they’re supposed to: mkdir -p /home/git/root_backup_folder cd /home/git/gitlab/git-data/repositories tar zcvf dailybackup.tar.gz * -C /home/git/root_backup_folder It is completely ignoring the -C argument and creating the file in /home/git/gitlab/git-data/repositories. What I’m doing wrong? December 31, 2017 at 2:37 am #36825 Anonymous Answer The -C flag doesn’t specify the output directory. You need to do this at the point at which you specify the archive file. So, your command could become: tar zcvf /home/git/root_backup_folder/dailybackup.tar.gz * Source: https://stackoverflow.com/questions/47980019/tar-compress-with-c-argument-doesnt-workAuthor: NickThis work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Author Posts Viewing 2 posts - 1 through 2 (of 2 total) You must be logged in to reply to this topic.