|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | 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 !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
copying files between two accounts
I tried to copy all the files from an account directory to my account's directory
I did this command: cp ~account1/direct/* ~myaccount/ the problem is that I did it twice, the first time there was a copy of some files, the seconde time there was a copy other files ? Which means the files were not the same... Any ideas about the prob ? ![]() |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
The result of both copies should be the same umless something changed in the directory you are copying from.
Furthermore, in general it is not very wise to copy something from another directory directly into your home directory. You could overwrite valid files present in your home directory. It is smarter to create an empty directory in your homedirectory and copy everything into that directory. mkdir ~myaccount/colleaguedir cp ~account1/direct/* ~myaccount/colleguedir Also, you might not have sufficient rights to copy all files in the other directory. Last but not least, subdirectories are not copied in this way. If you want those to be copied as well use: cp -r ~account1/direct/* ~myaccount/colleguedir Or even better: cp -r ~account1/direct ~myaccount/colleguedir This will include files starting with a . (DOT) present in ~account1/direct as well. |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
I appreciate your help, thank you sir
![]() |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Files copying - [ Listed files alone. ] - Shell script | linuxadmin | Shell Programming and Scripting | 4 | 07-31-2011 08:45 AM |
| copying of files by userB, dir & files owned by userA | Hangman2 | UNIX for Advanced & Expert Users | 2 | 08-07-2009 11:41 AM |
| Copying Files | user50210 | Solaris | 3 | 12-26-2008 05:29 AM |
| copying files | tjay83 | Shell Programming and Scripting | 4 | 08-25-2008 11:52 AM |
|
|