Skip to content
Advertisement

Change file permission for multiple file paths in a file

I have a file which stores multiple file paths in the file content, as such:

JavaScript

Is there a single line command to loop the file paths in the file and set the permission for each of the file paths chmod 644 <file paths in /var/tmp/sample>?

Advertisement

Answer

Another way to use xargs:

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement