Fork me on GitHub

It was so good to see everyone at the Conj!


I just appeared on the Streaming Audio podcast, and talked about Clojure+Kafka right toward the end. Short URL: Twitter: LinkedIn: Also posted on HackerNews

👍 8

Is there a good linux tool/command to transfer ownership of a directory and it's files from one user to another, keeping attention to which permissions the folder already has. I recently had to do some updates to my linux and unfortunately had to change my user name and ended up with my old home folder and the new one. I've copied files as needed but they eventually have random permission errors opening or saving to them.


something like find . -user $olduser -exec chown $newuser {} \;


you might need to user the numeric user id, so use -uid instead


I see, one of the user folders is kind of orphaned since I have a separate home folder, so when I booted up from the fresh install I had to choose a new user name, the id command doesn't really give me that user's id


if you look at one of the files it will tell you


ls -la /home/ |grep $olduser


that will either give you a numeric id or some random other username as the owner of the old users home directory


If you don't care about targeting a specific old user and just want everything to be owned by the new user, I use sudo chown -R john:john . (order might be slightly different)

👍 4