xargs not working in Linux as it works in Unix

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





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I am using following command to list down permission, owner of mount points in unix:



bdf|awk 'print $6'|grep -v Mounted|xargs ll -d


This command in HP-Ux provides me an output like below:



drwxr--r-- 61 root root 8192 Jan 1 2014 /
drwxr--r-- 102 root root 8192 Jan 1 2014 /home


But in Linux this command :



df -hP|grep -v Mounted|awk 'print $6'|xargs 'll -d'


gives an error:



xargs: ll -d: No such file or directory









share|improve this question






























    1















    I am using following command to list down permission, owner of mount points in unix:



    bdf|awk 'print $6'|grep -v Mounted|xargs ll -d


    This command in HP-Ux provides me an output like below:



    drwxr--r-- 61 root root 8192 Jan 1 2014 /
    drwxr--r-- 102 root root 8192 Jan 1 2014 /home


    But in Linux this command :



    df -hP|grep -v Mounted|awk 'print $6'|xargs 'll -d'


    gives an error:



    xargs: ll -d: No such file or directory









    share|improve this question


























      1












      1








      1








      I am using following command to list down permission, owner of mount points in unix:



      bdf|awk 'print $6'|grep -v Mounted|xargs ll -d


      This command in HP-Ux provides me an output like below:



      drwxr--r-- 61 root root 8192 Jan 1 2014 /
      drwxr--r-- 102 root root 8192 Jan 1 2014 /home


      But in Linux this command :



      df -hP|grep -v Mounted|awk 'print $6'|xargs 'll -d'


      gives an error:



      xargs: ll -d: No such file or directory









      share|improve this question
















      I am using following command to list down permission, owner of mount points in unix:



      bdf|awk 'print $6'|grep -v Mounted|xargs ll -d


      This command in HP-Ux provides me an output like below:



      drwxr--r-- 61 root root 8192 Jan 1 2014 /
      drwxr--r-- 102 root root 8192 Jan 1 2014 /home


      But in Linux this command :



      df -hP|grep -v Mounted|awk 'print $6'|xargs 'll -d'


      gives an error:



      xargs: ll -d: No such file or directory






      xargs






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 10 at 4:15









      Rui F Ribeiro

      42k1483142




      42k1483142










      asked Aug 1 '17 at 13:48









      Sam GSam G

      82




      82




















          1 Answer
          1






          active

          oldest

          votes


















          4














          The root of the error is that you have quoted ll -d in the arguments to xargs. xargs is then trying to execute a file called ll -d which it can't find anywhere on your path. If you remove the quotes, the command is likely to work. However, if ll is an alias rather than a command on the PATH, you may also need to use ls directly:



          df -hP | grep -v Mounted | awk 'print $6' | xargs ls -ld


          If you have mount points that include spaces, your parsing of df would fail to account for that.






          share|improve this answer























          • no need for grep here since awk is being used anyway. e.g. awk 'NR>1 print $6' or awk '!/Mounted/ print $6'

            – cas
            Aug 2 '17 at 4:20












          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%2f383162%2fxargs-not-working-in-linux-as-it-works-in-unix%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          4














          The root of the error is that you have quoted ll -d in the arguments to xargs. xargs is then trying to execute a file called ll -d which it can't find anywhere on your path. If you remove the quotes, the command is likely to work. However, if ll is an alias rather than a command on the PATH, you may also need to use ls directly:



          df -hP | grep -v Mounted | awk 'print $6' | xargs ls -ld


          If you have mount points that include spaces, your parsing of df would fail to account for that.






          share|improve this answer























          • no need for grep here since awk is being used anyway. e.g. awk 'NR>1 print $6' or awk '!/Mounted/ print $6'

            – cas
            Aug 2 '17 at 4:20
















          4














          The root of the error is that you have quoted ll -d in the arguments to xargs. xargs is then trying to execute a file called ll -d which it can't find anywhere on your path. If you remove the quotes, the command is likely to work. However, if ll is an alias rather than a command on the PATH, you may also need to use ls directly:



          df -hP | grep -v Mounted | awk 'print $6' | xargs ls -ld


          If you have mount points that include spaces, your parsing of df would fail to account for that.






          share|improve this answer























          • no need for grep here since awk is being used anyway. e.g. awk 'NR>1 print $6' or awk '!/Mounted/ print $6'

            – cas
            Aug 2 '17 at 4:20














          4












          4








          4







          The root of the error is that you have quoted ll -d in the arguments to xargs. xargs is then trying to execute a file called ll -d which it can't find anywhere on your path. If you remove the quotes, the command is likely to work. However, if ll is an alias rather than a command on the PATH, you may also need to use ls directly:



          df -hP | grep -v Mounted | awk 'print $6' | xargs ls -ld


          If you have mount points that include spaces, your parsing of df would fail to account for that.






          share|improve this answer













          The root of the error is that you have quoted ll -d in the arguments to xargs. xargs is then trying to execute a file called ll -d which it can't find anywhere on your path. If you remove the quotes, the command is likely to work. However, if ll is an alias rather than a command on the PATH, you may also need to use ls directly:



          df -hP | grep -v Mounted | awk 'print $6' | xargs ls -ld


          If you have mount points that include spaces, your parsing of df would fail to account for that.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Aug 1 '17 at 13:56









          Steven DSteven D

          32.9k898108




          32.9k898108












          • no need for grep here since awk is being used anyway. e.g. awk 'NR>1 print $6' or awk '!/Mounted/ print $6'

            – cas
            Aug 2 '17 at 4:20


















          • no need for grep here since awk is being used anyway. e.g. awk 'NR>1 print $6' or awk '!/Mounted/ print $6'

            – cas
            Aug 2 '17 at 4:20

















          no need for grep here since awk is being used anyway. e.g. awk 'NR>1 print $6' or awk '!/Mounted/ print $6'

          – cas
          Aug 2 '17 at 4:20






          no need for grep here since awk is being used anyway. e.g. awk 'NR>1 print $6' or awk '!/Mounted/ print $6'

          – cas
          Aug 2 '17 at 4:20


















          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%2f383162%2fxargs-not-working-in-linux-as-it-works-in-unix%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

          Peggy Mitchell

          Palaiologos

          The Forum (Inglewood, California)