rkyler
12-03-2002, 11:17 PM
I have a script that Ive placed in my skel directory for all new accounts, but I want to copy it to all existing accounts as well. I dont want to have to log in and upload it with ftp to every account. I logged in with root access and did cp -p -r and copied the files from one account to the other, but the script would not run, I could not even delete the files from the account. Had to go back in with root access. There has to be an easy way to copy a few files to every account. Anyone know how?? Im not real great with linux.
Thanks!!
Ron
lotuslnd
12-04-2002, 12:35 AM
Not 100% sure that I know what you want, but ... if you have a file that needs to go into all sites (for example), then you could do something like this:
#!/bin/sh
for domain in `ls -1 /home/sites`
do
cp /some/place/filename /home/sites/$domain
done
This assumes that /home/sites contains all the directories (domains, in this case) which need the file that's getting copied over.
Help at all?
HTTPbit
12-05-2002, 08:47 AM
I logged in with root access and did cp -p -r and copied the files from one account to the other, but the script would not run, I could not even delete the files from the account.
Use the following command if you want to make the copies as close as the original file/directory:
cp -a /home/dir1 /home/dir2
Please note, I am not a Linux expert, just know how to execute small commands. :)
Shikha
jolly
12-05-2002, 09:38 AM
Originally posted by Shikha
Use the following command if you want to make the copies as close as the original file/directory:
cp -a /home/dir1 /home/dir2
Please note, I am not a Linux expert, just know how to execute small commands. :)
Shikha
When any account is created it create new virtual directory system.
This is almost same copying all the files to each virtual directory again and again. This is not what he want.
He wants to put script file at one time to all the virtual host.
copy /file/path / TO file/*/path/direcotry/
:D:D:D:D