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
+7.5k Android Studio : AlertDialog to get user attention example
+22.8k Golang : Test file read write permission example
+6k Golang : Dealing with backquote
+35.1k Golang : Strip slashes from string example
+8k Golang : Append and add item in slice
+18.8k Golang : Read input from console line
+25.5k Golang : Daemonizing a simple web server process example
+4.6k Linux/MacOSX : How to symlink a file?
+4.6k Unix/Linux : How to pipe/save output of a command to file?
+8.4k Golang : How to check variable or object type during runtime?
+17.9k Golang : How to log each HTTP request to your web server?