How to create a symlink between folders

Sometimes when you have a uploads folder in your app and deploy again the app, the uploaded files just get removed. One solution is just to create a symlink between folders in order to automatically copy from the app’s upload folder to a safe folder.

Don’t worry, it’s easy. Let’s see how.

How to create a symlink between folders

Run the next command in your system:

ln -s /path/of/target/container /path/of/origin/to/copy/from

Note:

  1. The first path is the target container, where to store the files
  2. The second path is the origin folder, where to copy the files from
    It works!

Leave a comment with your doubts or experiences 🙂

David Burgos

Read more posts by this author.