Linux/MacOSX : How to symlink a file?
Problem :
How to create a symbolic link for a file?
NOTE :
A symbolic link, is a low-level pointer that is written into the file system on your hard drive ... pointing to the actual file or directory. It is not a short cut.
Solution :
Under Mac OS X and Linux, you can create a symbolic link by using the command “ln -s [source] [destination]”. For example :
ln -s /path/to/sourcefile /symlink/path/to/destination
Additional note for Windows, use the mklink command :
mklink /d \MyDocs \Users\User1\Documents
Reference :
By Adam Ng
IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.
Advertisement
Tutorials
+5.7k Fix sudo yum hang problem with no output or error messages
+11.6k Android Studio : Password input and reveal password example
+8.7k Golang : Check a web page existence with HEAD request example
+5.7k Restart Apache or Nginx web server without password prompt
+4.9k Java : Human readable password generator
+13.2k Golang : Convert(cast) int to float example
+12.5k Golang : How to check if a file is hidden?
+11.4k Golang : Get terminal width and height example
+12.7k Golang : How to check if your program is running in a terminal
+14.7k Golang : Generate universally unique identifier(UUID) example
+15.1k Golang : Fix cannot convert buffer (type *bytes.Buffer) to type string error