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, ITProTV*if the post above has answered the question, please mark the topic as solved.
**All "answers" and responses are offered "as is" and my opinion. There is no implied support or guarantee by the ITProTV team. -
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