DEV Community

Discussion on: Easily Manage Dot Files (Config Files)

Collapse
 
moopet profile image
Ben Sinclair

Why do you use sudo for every copy command? The implication is that your user account doesn't have access to things in its own home directory. You're then running a chown command to make sure everything's back to normal at the end. What's the reasoning there?

I recommend using something like GNU stow to handle this stuff automatically.

Collapse
 
ujwaldhakal profile image
ujwal dhakal

Yep, thanks for pointing it out. Actually, dotfiles was created by other user so i had to use sudo and unknowingly i put in all codes since these code works without sudo too as i have chown my home with the current user ujwal