LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 04-20-2006, 11:33 AM   #1
Anibal
Member
 
Registered: Jul 2003
Location: The Netherlands
Distribution: Slack/Ubuntu & OpenBSD (not a linux distro)
Posts: 56

Rep: Reputation: 15
cp a file to diferent subdirectorys of home


Hi,

I got a file i want to copy to diferent subdirectorys of a share server. /home/xxxxx/www/private

i'm doing this:
# cp -r index.php /home/*/www/private/

but getting this. Any help on this please i really don't know how to do this. don't wwant to do this one by one

# cp index.php /home/*/www/private/
cp: omitting directory `/home/ahm/www/private/'
cp: omitting directory `/home/alphaspl/www/private/'
cp: omitting directory `/home/amateur/www/private/'
cp: omitting directory `/home/animateu/www/private/'
cp: omitting directory `/home/annedokt/www/private/'
cp: omitting directory `/home/appelboo/www/private/'
cp: omitting directory `/home/atrium/www/private/'
cp: omitting directory `/home/awbpubli/www/private/'
cp: omitting directory `/home/badhoeve/www/private/'
cp: omitting directory `/home/balthaza/www/private/'
cp: omitting directory `/home/bechstei/www/private/'
cp: omitting directory `/home/beelen/www/private/'
cp: omitting directory `/home/beukberg/www/private/'
cp: omitting directory `/home/blutarsk/www/private/'
 
Old 04-20-2006, 11:36 AM   #2
UK MAdMaN
Member
 
Registered: Jul 2004
Location: Manchester, England
Distribution: Gentoo
Posts: 211

Rep: Reputation: 30
You don't have access to the other users' home directories. You'll have to run the command as root.
 
Old 04-20-2006, 11:51 AM   #3
demian
Member
 
Registered: Apr 2001
Location: Bremen, Germany
Distribution: Debian
Posts: 303

Rep: Reputation: 30
for i in /home/*/www/private/; do cp index.php $i; done
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ProFtpd Home directory on a Diferent Partition mambley Linux - Networking 1 01-24-2006 08:31 AM
how-to set up two diferent domains? alc@pone Slackware 3 12-06-2005 11:33 AM
Samba Server in two diferent netmask? owar Linux - Networking 3 08-26-2004 09:21 PM
diferent speed nics lord_zoo Linux - Networking 4 09-15-2003 01:24 AM
.htaccess in subdirectorys phoeniXflame Linux - General 1 03-30-2003 03:25 PM


All times are GMT -5. The time now is 04:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration