Linux: copy folder from one user to another

  • Thread starter Thread starter huntflex
  • Start date Start date
  • Tags Tags
    Linux
AI Thread Summary
To copy folders from one user to another in Linux, the correct command syntax is crucial. The user should ensure the destination path is accurate, such as using /newuser/folder or ~newuser/folder for the home directory. It's important to verify that the source folder exists and that the user has the necessary permissions. Additionally, using the correct path can prevent errors like "no such file or directory." Properly structuring the command will facilitate successful folder copying between users.
huntflex
Messages
26
Reaction score
0
Hello,

I'm having trouble copying some folders from one user to another. I've attempted something like this:

cp -r /olduser/folder ./newuser/folder

it just tells me no such file or directory
Can anybody please help ?

Thank you
 
Physics news on Phys.org
Don't you mean /newuser/folder?
Or ~newuser/folder, if you want to put it in their homedir?
Or ~newuser, if you don't want it in ~newuser/folder/folder?
 

Similar threads

Replies
4
Views
1K
Replies
3
Views
1K
Replies
1
Views
2K
Replies
20
Views
3K
Replies
9
Views
1K
Replies
17
Views
7K
Back
Top