2

I want to create an alias of my home folder but I don't have write permissions on parent directory.

I used to have a username (user) on an old server. But now, I'm using a new server and my username has been changed to user2. Many of my scripts have absolute path to my old home folder name (/home/user). I want them to be compatible on my new server, in which my home folder now is different (/home/user2).

Obviously, I could've just created a symbolic link to my previous home name (ln -s /home/user2 /home/user). However, I don't have write permissions to the /home directory.

Is there any alternate option to create such alias without root permissions?

Details:

I'm using CentOS 5.

1
  • Ask your admin to create the symlink. Nov 12, 2016 at 16:04

1 Answer 1

6

If your scripts are using paths based on the location of your home directory, use tilde ~ or an environment variable such as $HOME instead of hardcoding the absolute path.

1
  • 1
    @rikoji use awk or sed to replace your hard coded path. Nov 12, 2016 at 10:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .