What does `tar -C` mean?












7














In the section "Installing Portage", the Gentoo installation docs say:



# tar xvjf /mnt/gentoo/portage-latest.tar.bz2 -C /mnt/gentoo/usr


What does this command do?










share|improve this question





























    7














    In the section "Installing Portage", the Gentoo installation docs say:



    # tar xvjf /mnt/gentoo/portage-latest.tar.bz2 -C /mnt/gentoo/usr


    What does this command do?










    share|improve this question



























      7












      7








      7


      2





      In the section "Installing Portage", the Gentoo installation docs say:



      # tar xvjf /mnt/gentoo/portage-latest.tar.bz2 -C /mnt/gentoo/usr


      What does this command do?










      share|improve this question















      In the section "Installing Portage", the Gentoo installation docs say:



      # tar xvjf /mnt/gentoo/portage-latest.tar.bz2 -C /mnt/gentoo/usr


      What does this command do?







      linux tar gentoo






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 24 '18 at 15:34









      VL-80

      3,61922233




      3,61922233










      asked Dec 2 '11 at 10:17









      guilin 桂林guilin 桂林

      176226




      176226






















          3 Answers
          3






          active

          oldest

          votes


















          14














          Tar is used to handle archives (historically saved on tapes).




          • The x tells it to extract files from the archive


          • v stands for verbose


          • j for bzip2 archive


          • f indicates the file name

          • finally: C tells it to change directory (so the package content will be unpacked there)


          See also man tar.






          share|improve this answer































            5














            If you ever need to know what a parameter does again, try to read the man first. The command man tar, and then doing /-C will get you to the section describing what -C stands for, which in this example represents 'change directory' (i.e. sends the results of the unpacking to /mnt/gentoo/usr).






            share|improve this answer































              4














              It unpacks /mnt/gentoo/portage-latest.tar.bz2 in /mnt/gentoo/usr/






              share|improve this answer























                Your Answer








                StackExchange.ready(function() {
                var channelOptions = {
                tags: "".split(" "),
                id: "3"
                };
                initTagRenderer("".split(" "), "".split(" "), channelOptions);

                StackExchange.using("externalEditor", function() {
                // Have to fire editor after snippets, if snippets enabled
                if (StackExchange.settings.snippets.snippetsEnabled) {
                StackExchange.using("snippets", function() {
                createEditor();
                });
                }
                else {
                createEditor();
                }
                });

                function createEditor() {
                StackExchange.prepareEditor({
                heartbeatType: 'answer',
                autoActivateHeartbeat: false,
                convertImagesToLinks: true,
                noModals: true,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: 10,
                bindNavPrevention: true,
                postfix: "",
                imageUploader: {
                brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                allowUrls: true
                },
                onDemand: true,
                discardSelector: ".discard-answer"
                ,immediatelyShowMarkdownHelp:true
                });


                }
                });














                draft saved

                draft discarded


















                StackExchange.ready(
                function () {
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f363812%2fwhat-does-tar-c-mean%23new-answer', 'question_page');
                }
                );

                Post as a guest















                Required, but never shown

























                3 Answers
                3






                active

                oldest

                votes








                3 Answers
                3






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                14














                Tar is used to handle archives (historically saved on tapes).




                • The x tells it to extract files from the archive


                • v stands for verbose


                • j for bzip2 archive


                • f indicates the file name

                • finally: C tells it to change directory (so the package content will be unpacked there)


                See also man tar.






                share|improve this answer




























                  14














                  Tar is used to handle archives (historically saved on tapes).




                  • The x tells it to extract files from the archive


                  • v stands for verbose


                  • j for bzip2 archive


                  • f indicates the file name

                  • finally: C tells it to change directory (so the package content will be unpacked there)


                  See also man tar.






                  share|improve this answer


























                    14












                    14








                    14






                    Tar is used to handle archives (historically saved on tapes).




                    • The x tells it to extract files from the archive


                    • v stands for verbose


                    • j for bzip2 archive


                    • f indicates the file name

                    • finally: C tells it to change directory (so the package content will be unpacked there)


                    See also man tar.






                    share|improve this answer














                    Tar is used to handle archives (historically saved on tapes).




                    • The x tells it to extract files from the archive


                    • v stands for verbose


                    • j for bzip2 archive


                    • f indicates the file name

                    • finally: C tells it to change directory (so the package content will be unpacked there)


                    See also man tar.







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Nov 13 '13 at 6:18









                    rubo77

                    1,68772755




                    1,68772755










                    answered Dec 2 '11 at 10:26









                    chorobachoroba

                    13k13039




                    13k13039

























                        5














                        If you ever need to know what a parameter does again, try to read the man first. The command man tar, and then doing /-C will get you to the section describing what -C stands for, which in this example represents 'change directory' (i.e. sends the results of the unpacking to /mnt/gentoo/usr).






                        share|improve this answer




























                          5














                          If you ever need to know what a parameter does again, try to read the man first. The command man tar, and then doing /-C will get you to the section describing what -C stands for, which in this example represents 'change directory' (i.e. sends the results of the unpacking to /mnt/gentoo/usr).






                          share|improve this answer


























                            5












                            5








                            5






                            If you ever need to know what a parameter does again, try to read the man first. The command man tar, and then doing /-C will get you to the section describing what -C stands for, which in this example represents 'change directory' (i.e. sends the results of the unpacking to /mnt/gentoo/usr).






                            share|improve this answer














                            If you ever need to know what a parameter does again, try to read the man first. The command man tar, and then doing /-C will get you to the section describing what -C stands for, which in this example represents 'change directory' (i.e. sends the results of the unpacking to /mnt/gentoo/usr).







                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Dec 2 '11 at 20:58









                            Simon Sheehan

                            7,632124268




                            7,632124268










                            answered Dec 2 '11 at 10:42









                            timsstimss

                            309110




                            309110























                                4














                                It unpacks /mnt/gentoo/portage-latest.tar.bz2 in /mnt/gentoo/usr/






                                share|improve this answer




























                                  4














                                  It unpacks /mnt/gentoo/portage-latest.tar.bz2 in /mnt/gentoo/usr/






                                  share|improve this answer


























                                    4












                                    4








                                    4






                                    It unpacks /mnt/gentoo/portage-latest.tar.bz2 in /mnt/gentoo/usr/






                                    share|improve this answer














                                    It unpacks /mnt/gentoo/portage-latest.tar.bz2 in /mnt/gentoo/usr/







                                    share|improve this answer














                                    share|improve this answer



                                    share|improve this answer








                                    edited Jul 16 '12 at 2:18









                                    Tom Wijsman

                                    50.1k23164244




                                    50.1k23164244










                                    answered Dec 2 '11 at 10:24









                                    TogTog

                                    4,57483041




                                    4,57483041






























                                        draft saved

                                        draft discarded




















































                                        Thanks for contributing an answer to Super User!


                                        • Please be sure to answer the question. Provide details and share your research!

                                        But avoid



                                        • Asking for help, clarification, or responding to other answers.

                                        • Making statements based on opinion; back them up with references or personal experience.


                                        To learn more, see our tips on writing great answers.





                                        Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                        Please pay close attention to the following guidance:


                                        • Please be sure to answer the question. Provide details and share your research!

                                        But avoid



                                        • Asking for help, clarification, or responding to other answers.

                                        • Making statements based on opinion; back them up with references or personal experience.


                                        To learn more, see our tips on writing great answers.




                                        draft saved


                                        draft discarded














                                        StackExchange.ready(
                                        function () {
                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f363812%2fwhat-does-tar-c-mean%23new-answer', 'question_page');
                                        }
                                        );

                                        Post as a guest















                                        Required, but never shown





















































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown

































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown







                                        Popular posts from this blog

                                        Index of /

                                        Tribalistas

                                        Listed building