Computing.Net > Forums > Unix > Help copying .profile

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

Help copying .profile

Reply to Message Icon

Name: Troy
Date: June 2, 2003 at 07:14:27 Pacific
OS: hpux 11.0
CPU/Ram: fast with plenty of ram
Comment:

I need help with the command to copy a file from one directory to all of the sub-directories of another directory.

I need to copy the .profile from /home/person/ to all of the people in /home

I tried cp -r /home/person/.profile /home/*/

but that did not work.




Sponsored Link
Ads by Google

Response Number 1
Name: David Perry
Date: June 2, 2003 at 11:31:06 Pacific
Reply:

You need a looping structure

cd /home/
for dir in `ls /home/` ; do echo cp .profile $dir ; done


0
Reply to Message Icon

Related Posts

See More


How to detect EOF of a te... Cannot ping outside local...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Help copying .profile

Scripting help-copying directories www.computing.net/answers/unix/scripting-helpcopying-directories/7084.html

Perl: Split Function & Other Proble www.computing.net/answers/unix/perl-split-function-amp-other-proble/5834.html

Script help - .profile www.computing.net/answers/unix/script-help-profile/4479.html