开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜