Change the contents of the file in each line in the 20140321_files.txt file to Action_begin,
Sed-i "s/action/action_begin/g" ' Cat 20140321_files.txt '
Replace the file contents tags in 20140321_files.txt with tags.php
Sed-i "s/tags/tags.php/g" ' ls 20140321_files.txt '
Traversal loops 20140321_files.txt each row of paths/root/20140321/tags.php copy the past
For F in ' Cat 20140321_files.txt ';d o cp/root/20140321/tags.php $F;d One
Find all tags.php in the home directory to update the user rights that the file belongs to by using the path
1 #!/bin/bash
2 for F in ' find/home-name ' tags.php ';
3 do
4 user= "' Echo $F | Awk-f '/' {print $} ';
5 chown $user: $user $F
6 Done
Find the contents of all tags.php files under/home/that contain Action_begin, and the file is located in the thinkphp directory
find/home/-name "tags.php" | Xargs grep "Action_begin" | grep "thinkphp"