Basical help with cp command
I have a text file that I want copied inside the directoryeg: /home/username/public_html widget.txt
to all the directories inside public_html
eg :/ home/username/public_html/directory1
/ home/username/public_html/directory2
/ home/username/public_html/directory120
/ home/username/public_html/directory121
cp widget.txt directory1 directory2 directory3 directory120
I know that this can be achieved by listing each directory with a space
is there a way to do copy that file instantly into all of the directories without manually having to type them all in?
also would -p maintain permissions of that file.