Last active
August 29, 2015 14:10
-
-
Save rubo77/dc048d1a4dcf2d09c3a4 to your computer and use it in GitHub Desktop.
convert symbolic links to hardlinks with `ln -f`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mkdir /tmp/test | |
$ cd /tmp/test | |
$ touch original | |
$ ln -s original link | |
$ ls -li | |
3802330 lrwxrwxrwx 1 14 Dec 6 09:52 link -> original | |
3802269 -rw-rw-r-- 1 0 Dec 6 09:52 original | |
$ ln -f original link | |
$ ls -li | |
3802269 -rw-rw-r-- 2 0 Dec 6 09:56 link | |
3802269 -rw-rw-r-- 2 0 Dec 6 09:56 original |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
from discussion at http://unix.stackexchange.com/questions/171788/convert-a-hardlink-into-a-symbolic-link