How to copy one file in all users directories
Hi, I'm trying to do a script that copies some files in users directories as superuser,
for example, I want everyone to have the same .emacs file, but I cannot copy it one by one cause they're 100, I would like to do a script that copyes it to everyone at once.
How could I do that?
for usr in /home/*
cp /root/file $user/
( You can also grep and cut the passwd file to get a user list, trim it and do something like for usr in `cat /tmp/lst`; do cp /root/file ~$usr/; done; and many more fancy things )
|All times are GMT -5. The time now is 03:10 PM.|