Skip to main content
reverting to previous version because . doesnt work correctly on macOS
Source Link
Gerald
  • 211
  • 2
  • 4

ln -s /some/dir/ ~/Desktop/dir

You can also create a symlink for directory using the same command

ln -s ."$(pwd)" ~/Desktop/dir

To create symlink to current directory you are in.

ln -s /some/dir/ ~/Desktop/dir

You can also create a symlink for directory using the same command

ln -s . ~/Desktop/dir

To create symlink to current directory you are in.

ln -s /some/dir/ ~/Desktop/dir

You can also create a symlink for directory using the same command

ln -s "$(pwd)" ~/Desktop/dir

To create symlink to current directory you are in.

simplify command
Source Link
Gerald
  • 211
  • 2
  • 4

ln -s /some/dir/ ~/Desktop/dir

You can also create a symlink for directory using the same command

ln -s "$(pwd)". ~/Desktop/dir

To create symlink to current directory you are in.

pwd prints the working directory

$() outputs the result as argument while "" changes it into literals in case your directory names contains spaces

ln -s /some/dir/ ~/Desktop/dir

You can also create a symlink for directory using the same command

ln -s "$(pwd)" ~/Desktop/dir

To create symlink to current directory you are in.

pwd prints the working directory

$() outputs the result as argument while "" changes it into literals in case your directory names contains spaces

ln -s /some/dir/ ~/Desktop/dir

You can also create a symlink for directory using the same command

ln -s . ~/Desktop/dir

To create symlink to current directory you are in.

Source Link
Gerald
  • 211
  • 2
  • 4

ln -s /some/dir/ ~/Desktop/dir

You can also create a symlink for directory using the same command

ln -s "$(pwd)" ~/Desktop/dir

To create symlink to current directory you are in.

pwd prints the working directory

$() outputs the result as argument while "" changes it into literals in case your directory names contains spaces