How can I quickly create aliases with absolute paths?
-
03-07-2019 - |
Question
I often make mistakes in making aliases:
ln -S $Personal/Books $Buy/Books (1)
Instead, I have to write the whole path to get the last command working:
ln -S /Users/user/something/.../Books /Users/user/something/.../Books (2)
I would really love to get something similar to (1) working. It is so time consuming to do (2). How can I quickly create absolute paths for aliases?
Solution
I assume in your example the paths Personal and Buy are both directories in your home directory. Then you can create a relative symlink by typing
cd Buy
ln -s ../Personal/Books Books
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow