logoalt Hacker News

Y_Ytoday at 1:02 PM3 repliesview on HN

  tmp="$(mktemp -d)" && rsync -a --exclude='.ssh' user@host:~/.[!.]* "$tmp"/ && HOME="$tmp" exec "$SHELL"

Replies

grepfru_ittoday at 1:47 PM

I think this will copy your 9gb Mozilla cache directory as well? Still one liners like this is all you need lol

show 2 replies
sdovan1today at 3:52 PM

Overriding HOME variable is neat! Make things much easier.

imirictoday at 1:20 PM

I use something similar.

It's surprising to me how many projects can be replaced with just a line or two of shell script. This project is a slightly more sophisticated shell script that exposes a friendlier UI, but I don't see why it's needed when the alternative is much simpler, considering the target audience.