Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent usage of tar #6

Open
msuhanov opened this issue Oct 6, 2023 · 0 comments
Open

Inconsistent usage of tar #6

msuhanov opened this issue Oct 6, 2023 · 0 comments

Comments

@msuhanov
Copy link

msuhanov commented Oct 6, 2023

Hello.

It seems that tar is called with wrong arguments in the script.

  1. There is no --exclude-from argument in Solaris.

    tar --exclude=$OUTPUT_DIR -cvf $OUTPUT_DIR/homedir/home/home.tar /home/ --exclude-from $OUTPUT_DIR/homedir/oversized_files.txt 1> /dev/null 2> /dev/null

  2. In macOS, the --exclude-from argument must be given before the path (to be archived).

    tar --exclude=$OUTPUT_DIR -cvf $OUTPUT_DIR/homedir/home/home.tar /home/ --exclude-from $OUTPUT_DIR/homedir/oversized_files.txt 1> /dev/null 2> /dev/null

  3. In GNU/Linux, things are more complicated with the --exclude-from argument.

    tar --exclude=$OUTPUT_DIR -cvf $OUTPUT_DIR/homedir/home/home.tar /home/ --exclude-from $OUTPUT_DIR/homedir/oversized_files.txt 1> /dev/null 2> /dev/null

    See: https://stackoverflow.com/a/56350393

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant