Why doesn’t this work?
find . -maxdepth 1 -type f -print0 | xargs -0 .
All I get is xargs: .: Permission denied.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When you run
. file, you invoke a the shell builtin.. Yourxargsvariant tries to execute the current directory.Even if that did invoke the builtin, that command runs in a subshell, so all the “sourcing” would be useless.
Use shell globbing and a loop for that: