chown -R exclude some directoryChown in Linux and permissionsCreate softlinks to a file in every...

Replacing tantalum capacitor with ceramic capacitor for Op Amps

Does the US political system, in principle, allow for a no-party system?

Calculate total length of edges in select Voronoi diagram

How to write a chaotic neutral protagonist and prevent my readers from thinking they are evil?

PTIJ: Mouthful of Mitzvos

Do natural melee weapons (from racial traits) trigger Improved Divine Smite?

ESPP--any reason not to go all in?

How do you make a gun that shoots melee weapons and/or swords?

Linear Combination of Atomic Orbitals

Why can't we use freedom of speech and expression to incite people to rebel against government in India?

Preparing as much as possible of a cake in advance

Under what conditions would I NOT add my Proficiency Bonus to a Spell Attack Roll (or Saving Throw DC)?

Does the in-code argument passing conventions used on PDP-11's have a name?

The (Easy) Road to Code

Can inspiration allow the Rogue to make a Sneak Attack?

What is the meaning of option 'by' in TikZ Intersections

Rationale to prefer local variables over instance variables?

What does "rhumatis" mean?

Is divide-by-zero a security vulnerability?

The Key to the Door

Why won't the strings command stop?

Was it really inappropriate to write a pull request for the company I interviewed with?

School performs periodic password audits. Is my password compromised?

Can a Mimic (container form) actually hold loot?



chown -R exclude some directory


Chown in Linux and permissionsCreate softlinks to a file in every subfolderInclude exclude patterns rsync relativeHow should chmod and chown be used together?some doubts about chown command in linux?How to chown directory for multiple users?Tar withour directory structure and exclude foldersConfirmation prompt for chmod, chownBest way to ensure the contents of a directory is always owned by Apachersync exclude a folder containing a .git sub dir (--filter)













0















I want to exclude some large content directory



I'm Using it to chown Directory



chown -R admin /home/admin/web/public_html


is there anyway to exclude a subdirectory under html



Like:



chown -R admin exclude=/home/admin/web/public_html/content /home/admin/web/public_html


Something like that



Thanks










share|improve this question














bumped to the homepage by Community yesterday


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.




















    0















    I want to exclude some large content directory



    I'm Using it to chown Directory



    chown -R admin /home/admin/web/public_html


    is there anyway to exclude a subdirectory under html



    Like:



    chown -R admin exclude=/home/admin/web/public_html/content /home/admin/web/public_html


    Something like that



    Thanks










    share|improve this question














    bumped to the homepage by Community yesterday


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


















      0












      0








      0








      I want to exclude some large content directory



      I'm Using it to chown Directory



      chown -R admin /home/admin/web/public_html


      is there anyway to exclude a subdirectory under html



      Like:



      chown -R admin exclude=/home/admin/web/public_html/content /home/admin/web/public_html


      Something like that



      Thanks










      share|improve this question














      I want to exclude some large content directory



      I'm Using it to chown Directory



      chown -R admin /home/admin/web/public_html


      is there anyway to exclude a subdirectory under html



      Like:



      chown -R admin exclude=/home/admin/web/public_html/content /home/admin/web/public_html


      Something like that



      Thanks







      linux debian file-permissions chmod chown






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 20 '18 at 13:43









      MitraMitra

      11




      11





      bumped to the homepage by Community yesterday


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community yesterday


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
























          2 Answers
          2






          active

          oldest

          votes


















          0














          find . -type d -not -path /home/admin/web/public_html  -prune -o -print0 | xargs -0 chown admin 


          Where -type d filter by directory and -not -path /home/admin/web/public_html exclude the directory.






          share|improve this answer
























          • Thanks, for your answer. I had try that just like this. find . -type d ( -path contents -o -path admin/logs -o -path admin/data/backup -o -path admin/data/conversion -o -path admin/smarty/cache -o -path admin/data/engine/storage -o -path 78 -o -path 976 -o -path tmp ) -prune -o -print | xargs chown -R admin

            – Mitra
            Mar 20 '18 at 14:19













          • But Its also taking long time

            – Mitra
            Mar 20 '18 at 14:20











          • Should I add -not

            – Mitra
            Mar 20 '18 at 14:22











          • If you have a long list then a better approach is to create a file and grep the result. So let say that the exclusion list is in the zzNotNowChownPlease file. Then: find . -type d |grep -fv zzNotNowChownPlease |xargs chown -R admin Should work. Just test the find+grep before.

            – emaV
            Mar 20 '18 at 14:39





















          0














          from /home/admin/web/public_html



          find . ! -name "content" | xargs -I {} chown admin {}


          should work fine, hope it helps you






          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%2f1306122%2fchown-r-exclude-some-directory%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









            0














            find . -type d -not -path /home/admin/web/public_html  -prune -o -print0 | xargs -0 chown admin 


            Where -type d filter by directory and -not -path /home/admin/web/public_html exclude the directory.






            share|improve this answer
























            • Thanks, for your answer. I had try that just like this. find . -type d ( -path contents -o -path admin/logs -o -path admin/data/backup -o -path admin/data/conversion -o -path admin/smarty/cache -o -path admin/data/engine/storage -o -path 78 -o -path 976 -o -path tmp ) -prune -o -print | xargs chown -R admin

              – Mitra
              Mar 20 '18 at 14:19













            • But Its also taking long time

              – Mitra
              Mar 20 '18 at 14:20











            • Should I add -not

              – Mitra
              Mar 20 '18 at 14:22











            • If you have a long list then a better approach is to create a file and grep the result. So let say that the exclusion list is in the zzNotNowChownPlease file. Then: find . -type d |grep -fv zzNotNowChownPlease |xargs chown -R admin Should work. Just test the find+grep before.

              – emaV
              Mar 20 '18 at 14:39


















            0














            find . -type d -not -path /home/admin/web/public_html  -prune -o -print0 | xargs -0 chown admin 


            Where -type d filter by directory and -not -path /home/admin/web/public_html exclude the directory.






            share|improve this answer
























            • Thanks, for your answer. I had try that just like this. find . -type d ( -path contents -o -path admin/logs -o -path admin/data/backup -o -path admin/data/conversion -o -path admin/smarty/cache -o -path admin/data/engine/storage -o -path 78 -o -path 976 -o -path tmp ) -prune -o -print | xargs chown -R admin

              – Mitra
              Mar 20 '18 at 14:19













            • But Its also taking long time

              – Mitra
              Mar 20 '18 at 14:20











            • Should I add -not

              – Mitra
              Mar 20 '18 at 14:22











            • If you have a long list then a better approach is to create a file and grep the result. So let say that the exclusion list is in the zzNotNowChownPlease file. Then: find . -type d |grep -fv zzNotNowChownPlease |xargs chown -R admin Should work. Just test the find+grep before.

              – emaV
              Mar 20 '18 at 14:39
















            0












            0








            0







            find . -type d -not -path /home/admin/web/public_html  -prune -o -print0 | xargs -0 chown admin 


            Where -type d filter by directory and -not -path /home/admin/web/public_html exclude the directory.






            share|improve this answer













            find . -type d -not -path /home/admin/web/public_html  -prune -o -print0 | xargs -0 chown admin 


            Where -type d filter by directory and -not -path /home/admin/web/public_html exclude the directory.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Mar 20 '18 at 14:16









            emaVemaV

            12




            12













            • Thanks, for your answer. I had try that just like this. find . -type d ( -path contents -o -path admin/logs -o -path admin/data/backup -o -path admin/data/conversion -o -path admin/smarty/cache -o -path admin/data/engine/storage -o -path 78 -o -path 976 -o -path tmp ) -prune -o -print | xargs chown -R admin

              – Mitra
              Mar 20 '18 at 14:19













            • But Its also taking long time

              – Mitra
              Mar 20 '18 at 14:20











            • Should I add -not

              – Mitra
              Mar 20 '18 at 14:22











            • If you have a long list then a better approach is to create a file and grep the result. So let say that the exclusion list is in the zzNotNowChownPlease file. Then: find . -type d |grep -fv zzNotNowChownPlease |xargs chown -R admin Should work. Just test the find+grep before.

              – emaV
              Mar 20 '18 at 14:39





















            • Thanks, for your answer. I had try that just like this. find . -type d ( -path contents -o -path admin/logs -o -path admin/data/backup -o -path admin/data/conversion -o -path admin/smarty/cache -o -path admin/data/engine/storage -o -path 78 -o -path 976 -o -path tmp ) -prune -o -print | xargs chown -R admin

              – Mitra
              Mar 20 '18 at 14:19













            • But Its also taking long time

              – Mitra
              Mar 20 '18 at 14:20











            • Should I add -not

              – Mitra
              Mar 20 '18 at 14:22











            • If you have a long list then a better approach is to create a file and grep the result. So let say that the exclusion list is in the zzNotNowChownPlease file. Then: find . -type d |grep -fv zzNotNowChownPlease |xargs chown -R admin Should work. Just test the find+grep before.

              – emaV
              Mar 20 '18 at 14:39



















            Thanks, for your answer. I had try that just like this. find . -type d ( -path contents -o -path admin/logs -o -path admin/data/backup -o -path admin/data/conversion -o -path admin/smarty/cache -o -path admin/data/engine/storage -o -path 78 -o -path 976 -o -path tmp ) -prune -o -print | xargs chown -R admin

            – Mitra
            Mar 20 '18 at 14:19







            Thanks, for your answer. I had try that just like this. find . -type d ( -path contents -o -path admin/logs -o -path admin/data/backup -o -path admin/data/conversion -o -path admin/smarty/cache -o -path admin/data/engine/storage -o -path 78 -o -path 976 -o -path tmp ) -prune -o -print | xargs chown -R admin

            – Mitra
            Mar 20 '18 at 14:19















            But Its also taking long time

            – Mitra
            Mar 20 '18 at 14:20





            But Its also taking long time

            – Mitra
            Mar 20 '18 at 14:20













            Should I add -not

            – Mitra
            Mar 20 '18 at 14:22





            Should I add -not

            – Mitra
            Mar 20 '18 at 14:22













            If you have a long list then a better approach is to create a file and grep the result. So let say that the exclusion list is in the zzNotNowChownPlease file. Then: find . -type d |grep -fv zzNotNowChownPlease |xargs chown -R admin Should work. Just test the find+grep before.

            – emaV
            Mar 20 '18 at 14:39







            If you have a long list then a better approach is to create a file and grep the result. So let say that the exclusion list is in the zzNotNowChownPlease file. Then: find . -type d |grep -fv zzNotNowChownPlease |xargs chown -R admin Should work. Just test the find+grep before.

            – emaV
            Mar 20 '18 at 14:39















            0














            from /home/admin/web/public_html



            find . ! -name "content" | xargs -I {} chown admin {}


            should work fine, hope it helps you






            share|improve this answer




























              0














              from /home/admin/web/public_html



              find . ! -name "content" | xargs -I {} chown admin {}


              should work fine, hope it helps you






              share|improve this answer


























                0












                0








                0







                from /home/admin/web/public_html



                find . ! -name "content" | xargs -I {} chown admin {}


                should work fine, hope it helps you






                share|improve this answer













                from /home/admin/web/public_html



                find . ! -name "content" | xargs -I {} chown admin {}


                should work fine, hope it helps you







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 23 '18 at 16:27









                Sean DaveySean Davey

                37218




                37218






























                    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.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1306122%2fchown-r-exclude-some-directory%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

                    Cannot install PyQt5 The Next CEO of Stack OverflowCannot install tcpreplay 3.4.4cannot...

                    Kapp-Putsch Acontecimentos | Outros artigos | Menu de navegação

                    Why did early computer designers eschew integers? The Next CEO of Stack OverflowWhat register...