Re: cp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Mar 15, 2009 at 11:44 PM, mark <m.roth2006@xxxxxxx> wrote:

> Raj Har wrote:
> > hello everybody,
> >                         i am new in Linux so please help me.
> > i made users like user1,user2,user3,user4.not from useradd command.
> > and i wanna copy all skel file in these users home directory.
> > i am using this command.
> > cp -rf /etc/skel/.bash* /home/user*
> > but its not working.
> >
> > and i wanna know exact mean of  "-r" option.
>





Try this
###################

1) Save the list of user names to a file say:   /home/user.txt


2) then run the following command:


for user in `cat /home/user.txt` ; do cp -f /etc/skel/.bash* /home/$user/ ;
done



Btw,  -r option means ( copy recursive for cp command ) , however, since you
are likely to copy files only ( .bash* ) , so -r option is not necessary.
-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux