Why can't I pipe the output of find
command to to ls
?
-
Cant pipe output of find to ls, why?
-
According to the man page of
ls(1)
.The ls command takes its arguments on the command line not on standard input (i. e. file descriptor 0).
Cordially,
Ronnie Wong
Edutainer Manager, ITProTV*if the post above has answered the question, please mark as solved.
**All "answers" and responses are offered "as is" and my opinion. There is no implied service, support, or guarantee by ITProTV. -
You can use the xargs command to pipe the output of find to ls. with xargs you can execute a command with input from standard input.
Ex:
find /home -name Downloads | xargs ls -l