cp --reflink=auto for MacOS X

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












1















cp --reflink=auto shows following output for MacOS:




cp: illegal option -- -




Is copy-on-write or deduplication supported for HFS? How can I COW huge files with HFS?










share|improve this question


























    1















    cp --reflink=auto shows following output for MacOS:




    cp: illegal option -- -




    Is copy-on-write or deduplication supported for HFS? How can I COW huge files with HFS?










    share|improve this question
























      1












      1








      1








      cp --reflink=auto shows following output for MacOS:




      cp: illegal option -- -




      Is copy-on-write or deduplication supported for HFS? How can I COW huge files with HFS?










      share|improve this question














      cp --reflink=auto shows following output for MacOS:




      cp: illegal option -- -




      Is copy-on-write or deduplication supported for HFS? How can I COW huge files with HFS?







      file-copy hfs+ deduplication






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Sep 22 '16 at 8:25









      SergeiSergei

      17018




      17018




















          2 Answers
          2






          active

          oldest

          votes


















          1














          Unfortunately the --reflink=auto option isn't available in MacOS just yet. HFS also does not natively support CoW (Copy on Write).



          Perhaps in future such support will be added - likely when ZFS becomes natively available.



          I suggest referring to the man page to get the options that are currently available to you: man cp




          NOTE:



          In MacOS, most commands (including cp) only support short options, not long options. Thus, if there were an equivalent, it would be a single character only. Example would be -L or --dereference available in GNU coreutils' version of cp. In MacOS, only -L is available.






          share|improve this answer






























            0














            Apple's new APFS filesystem supports copy-on-write; CoW is automatically enabled in Finder copy operations where available, and when using cp -c on the command line.



            Unfortunately, cp -c is equivalent to cp --reflink=always (not auto), and will fail when copy-on-write is not possible with



            cp: somefile: clonefile failed: Operation not supported


            I'm not aware of a way to get auto behavior. You could make a shell script or function with automatic fallback a la



            cpclone() cp "$@"; 


            but it'll be difficult to make it entirely reliable for all edge cases.






            share|improve this answer























              Your Answer








              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "106"
              ;
              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: false,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              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%2funix.stackexchange.com%2fquestions%2f311536%2fcp-reflink-auto-for-macos-x%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              1














              Unfortunately the --reflink=auto option isn't available in MacOS just yet. HFS also does not natively support CoW (Copy on Write).



              Perhaps in future such support will be added - likely when ZFS becomes natively available.



              I suggest referring to the man page to get the options that are currently available to you: man cp




              NOTE:



              In MacOS, most commands (including cp) only support short options, not long options. Thus, if there were an equivalent, it would be a single character only. Example would be -L or --dereference available in GNU coreutils' version of cp. In MacOS, only -L is available.






              share|improve this answer



























                1














                Unfortunately the --reflink=auto option isn't available in MacOS just yet. HFS also does not natively support CoW (Copy on Write).



                Perhaps in future such support will be added - likely when ZFS becomes natively available.



                I suggest referring to the man page to get the options that are currently available to you: man cp




                NOTE:



                In MacOS, most commands (including cp) only support short options, not long options. Thus, if there were an equivalent, it would be a single character only. Example would be -L or --dereference available in GNU coreutils' version of cp. In MacOS, only -L is available.






                share|improve this answer

























                  1












                  1








                  1







                  Unfortunately the --reflink=auto option isn't available in MacOS just yet. HFS also does not natively support CoW (Copy on Write).



                  Perhaps in future such support will be added - likely when ZFS becomes natively available.



                  I suggest referring to the man page to get the options that are currently available to you: man cp




                  NOTE:



                  In MacOS, most commands (including cp) only support short options, not long options. Thus, if there were an equivalent, it would be a single character only. Example would be -L or --dereference available in GNU coreutils' version of cp. In MacOS, only -L is available.






                  share|improve this answer













                  Unfortunately the --reflink=auto option isn't available in MacOS just yet. HFS also does not natively support CoW (Copy on Write).



                  Perhaps in future such support will be added - likely when ZFS becomes natively available.



                  I suggest referring to the man page to get the options that are currently available to you: man cp




                  NOTE:



                  In MacOS, most commands (including cp) only support short options, not long options. Thus, if there were an equivalent, it would be a single character only. Example would be -L or --dereference available in GNU coreutils' version of cp. In MacOS, only -L is available.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jul 31 '17 at 15:21









                  zaTrickyzaTricky

                  22327




                  22327























                      0














                      Apple's new APFS filesystem supports copy-on-write; CoW is automatically enabled in Finder copy operations where available, and when using cp -c on the command line.



                      Unfortunately, cp -c is equivalent to cp --reflink=always (not auto), and will fail when copy-on-write is not possible with



                      cp: somefile: clonefile failed: Operation not supported


                      I'm not aware of a way to get auto behavior. You could make a shell script or function with automatic fallback a la



                      cpclone() cp "$@"; 


                      but it'll be difficult to make it entirely reliable for all edge cases.






                      share|improve this answer



























                        0














                        Apple's new APFS filesystem supports copy-on-write; CoW is automatically enabled in Finder copy operations where available, and when using cp -c on the command line.



                        Unfortunately, cp -c is equivalent to cp --reflink=always (not auto), and will fail when copy-on-write is not possible with



                        cp: somefile: clonefile failed: Operation not supported


                        I'm not aware of a way to get auto behavior. You could make a shell script or function with automatic fallback a la



                        cpclone() cp "$@"; 


                        but it'll be difficult to make it entirely reliable for all edge cases.






                        share|improve this answer

























                          0












                          0








                          0







                          Apple's new APFS filesystem supports copy-on-write; CoW is automatically enabled in Finder copy operations where available, and when using cp -c on the command line.



                          Unfortunately, cp -c is equivalent to cp --reflink=always (not auto), and will fail when copy-on-write is not possible with



                          cp: somefile: clonefile failed: Operation not supported


                          I'm not aware of a way to get auto behavior. You could make a shell script or function with automatic fallback a la



                          cpclone() cp "$@"; 


                          but it'll be difficult to make it entirely reliable for all edge cases.






                          share|improve this answer













                          Apple's new APFS filesystem supports copy-on-write; CoW is automatically enabled in Finder copy operations where available, and when using cp -c on the command line.



                          Unfortunately, cp -c is equivalent to cp --reflink=always (not auto), and will fail when copy-on-write is not possible with



                          cp: somefile: clonefile failed: Operation not supported


                          I'm not aware of a way to get auto behavior. You could make a shell script or function with automatic fallback a la



                          cpclone() cp "$@"; 


                          but it'll be difficult to make it entirely reliable for all edge cases.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Mar 4 at 18:56









                          Søren LøvborgSøren Løvborg

                          1113




                          1113



























                              draft saved

                              draft discarded
















































                              Thanks for contributing an answer to Unix & Linux Stack Exchange!


                              • 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%2funix.stackexchange.com%2fquestions%2f311536%2fcp-reflink-auto-for-macos-x%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