Created
June 25, 2013 10:52
-
-
Save stansidel/5857605 to your computer and use it in GitHub Desktop.
A command to copy a default robots.txt to all sites missing it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find /www/ -mindepth 1 -maxdepth 1 -type d '!' -exec test -e "{}/robots.txt" ';' -print0 | sudo xargs -0 -I target_folder cp /www/0default/robots.txt target_folder/ --preserve=mode,ownership |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment