Search code examples
linuxredhathome-directory

How can i symlink home directory in linux


I have my home directory in /home/tom. In another partition I have a folder called /data/tomhome.

Basically, I copy all of my data from /data/tomhome to /home/tom

But whenever I update files in /data/tomhome, I still have to copy them to the other directory.

Another way will be to symlink all files but i don't want to make 20 symlinks.

Is there any other way for this?


Solution

  • Try

    ln -s /home/tom /data/tomhome
    

    Note: You should delete the directory /data/tomhome with rm -rf /data/tomhome if it exists already