Friday, May 3, 2024
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 4165  / 1 Year ago, fri, may 5, 2023, 7:53:55

I've had to move from one user to another, I have found online how to move all files (including hidden) from the old user to the new and change the ownership of those files. However how can I change the ownership of all hidden folders & files which I moved across to my new home dictionary in one simple command.


More From » command-line

 Answers
7
cd ~
sudo chown -R $USER:$USER .*



  • The -R will do all dirs and files in dirs.

  • The . will alter only hidden files (since those always start with a .).

  • The $USER needs no changing: it will be substituted to your username.


[#32707] Sunday, May 7, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ngthmated

Total Points: 12
Total Questions: 115
Total Answers: 113

Location: Saint Vincent and the Grenadines
Member since Wed, Apr 21, 2021
3 Years ago
;