xargs not working in Linux as it works in Unix

Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
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
add a comment |
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
add a comment |
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
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
xargs
edited Mar 10 at 4:15
Rui F Ribeiro
42k1483142
42k1483142
asked Aug 1 '17 at 13:48
Sam GSam G
82
82
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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.
no need for grep here since awk is being used anyway. e.g.awk 'NR>1 print $6'orawk '!/Mounted/ print $6'
– cas
Aug 2 '17 at 4:20
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
no need for grep here since awk is being used anyway. e.g.awk 'NR>1 print $6'orawk '!/Mounted/ print $6'
– cas
Aug 2 '17 at 4:20
add a comment |
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.
no need for grep here since awk is being used anyway. e.g.awk 'NR>1 print $6'orawk '!/Mounted/ print $6'
– cas
Aug 2 '17 at 4:20
add a comment |
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.
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.
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'orawk '!/Mounted/ print $6'
– cas
Aug 2 '17 at 4:20
add a comment |
no need for grep here since awk is being used anyway. e.g.awk 'NR>1 print $6'orawk '!/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
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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