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.3k Golang : Get S3 or CloudFront object or file information
+8.1k Golang : Metaprogramming example of wrapping a function
+40.1k Golang : Convert to io.ReadSeeker type
+4.9k Golang : micron to centimeter example
+12.1k Golang : Flush and close file created by os.Create and bufio.NewWriter example
+29.2k Golang : Saving(serializing) and reading file with GOB
+9.6k Golang : Detect number of active displays and the display's resolution
+10.8k Golang : Create Temporary File
+12.4k Golang : Arithmetic operation with numerical slices or arrays example
+79.1k Golang : How to return HTTP status code?
+5.5k Golang : Frobnicate or tweaking a string example
+21.9k Fix "Failed to start php5-fpm.service: Unit php5-fpm.service is masked."