![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Tar only the Directories and Sub Directories | Andysundar | UNIX for Dummies Questions & Answers | 3 | 06-01-2008 08:54 PM |
| Listing directories and sub directories | jinxor | UNIX for Advanced & Expert Users | 3 | 03-11-2008 10:27 AM |
| moving directories to new directories on multiple servers | mackdaddy07 | Shell Programming and Scripting | 0 | 04-06-2007 11:30 AM |
| directories | arunkumar_mca | UNIX for Dummies Questions & Answers | 2 | 10-14-2004 03:23 AM |
| du -ks on certain directories only | Shambo | Shell Programming and Scripting | 1 | 09-05-2002 04:41 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
cp to all directories.
SCO UnixWare 7
Hi friends, I have experimented with various loops but can't seem to get it right. I have a file which I need to copy into all users home directories. Is there an easy way of doing this ? Thanks Suresh |
|
||||
|
You might try this....
$ find /yourtophome -type d -exec cp /tmp/mycpfile {} \; Only drawback, it puts it into EVERY directory recursively /home/user/saved/mycpfile /home/user/junk/mycpfile /home/user/mycpfile Otherwise, post your script or at least what you are attempting to do this in (shell). Here is a hint in csh (which no one usually uses) %pwd /home % foreach xx ( `ls -1d ./*`) cp /tmp/mycpfile $xx/mycpfile end % Last edited by thehoghunter; 06-20-2003 at 11:30 AM.. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|