开发者

How to get filepath from inside text file and perform operation in bash

开发者 https://www.devze.com 2023-03-06 04:10 出处:网络
I have list of folders path like /home/user/wwww /home/www/www/temp They are stored in a text file . Now i want get those path for dir names an开发者_高级运维d make them all 777 permissionYou can d

I have list of folders path like

/home/user/wwww
/home/www/www/temp

They are stored in a text file . Now i want get those path for dir names an开发者_高级运维d make them all 777 permission


You can do like this:

cat file.txt | while read line; do chmod 777 "$line"; done

This will change mode to 77 for each "$line" in input file file.txt.

0

精彩评论

暂无评论...
验证码 换一张
取 消