-
_original/
A.txt
img.jpg
-
shortcut/
A.txt - Shortcut
.lnk
<-own bin extensionA - SymLink.txt
A - Hardlink.txt
img.jpg - Shortcut
.lnk
<-own bin extensionimg - SymLink.jpg
img - Hardlink.jpg
What happens with links on opening
Win Shortcut | Symlink | Hardlink | |
---|---|---|---|
File Explorer | opens original file | opens original file | opens Hardlink file itself, with original content |
CMD : %PATH% |
opens original file | opens original file | opens Hardlink file itself, with original content |
PowerShell : & %PATH% |
opens original file | opens original file | opens Hardlink file itself, with original content |
ler no terminal (cat, more, less, type ) |
opens Shortcut binary itself (.lnk) | opens Symlink file itself, with original content | opens Hardlink file itself, with original content |
comando Open do programa | opens original file | opens original file | opens Hardlink file itself, with original content |
programa via terminal (CMD, PowerShell and GIT Bash) | opens Shortcut binary itself (.lnk) | opens Symlink file itself, with original content | opens Hardlink file itself, with original content |
drag & drop | opens Shortcut binary itself (.lnk) | opens Symlink file itself, with original content | opens Hardlink file itself, with original content |
tested softwares: Notepad, Sublime Text, VS Code, Blender
_
Win Shortcut | Symlink | Hardlink | |
---|---|---|---|
File Explorer | opens original file | opens original file | opens Hardlink file itself, with original content |
CMD : %PATH% |
opens original file | opens original file | opens Hardlink file itself, with original content |
PowerShell : & %PATH% |
opens original file | opens original file | opens Hardlink file itself, with original content |
Software's Open command | opens original file | opens original file | opens Hardlink file itself, with original content |
Software over terminal (CMD, PowerShell and GIT Bash) | opens Shortcut binary itself (.lnk) | opens Symlink file itself, with original content | opens Hardlink file itself, with original content |
Drag & drop | opens Shortcut binary itself (.lnk) | opens Symlink file itself, with original content | opens Hardlink file itself, with original content |
tested softwares: Win Photos, MS Paint, Krita, Photoshop, Blender, Sublime Text, VS Code, Chrome, MS Edge
What happens with links when copying or moving files/directories
Copy | Cortar & Colar/Move | |
---|---|---|
original | change nothing on links, all point the same files as before |
|
Win Shortcut | link kept point to original file | link kept point to original file |
Symlink | link lost. Symlink consolidates as own file | link lost. Symlink not remapped |
Hardlink | link kept in normal estate | link kept in normal estate |
directory ./_original/ |
change nothing on links, all point the same files as before | Symlink lost (relative address didn't update). Hardlink kept in normal state Win Shortcut did remap |
directory ./shortcut/ |
Hardlink and Symlink lost, Win Shortcut link kept | Symlink lost (relative address didn't update) Hardlink and Win Shortcut kept in normal state |
root dir. ./ |
Hardlink and Symlink lost, did consolidate as own files. Win Shortcut kept link to original, didn't remap | Links kept in normal state, did remap |
What happens with working links on opening and editing files' content
- all links kept. New content reflected correctly.
- all links kept. New content reflected correctly.
- all links kept. New content reflected correctly.
- all links kept. New content reflected correctly.
editing ways tested: Notepad, Sublime Text, VS Code, Blender, console redirector (>> .
)
_
- Hardlink lost. Consolidated eas own file with original content.
- Symlink and Win Shortcut kept links
- If opens original image, that is the one replaced, then links behave the respective way
- If editing .lnk binary, changes/breaks the link
- If opens original image, that is the one replaced, then links behave the respective way
- If opens as "...Symlink.jpg", saving consolidates as new file, loosing link
- Always opens as "...Hardlink.jpg", saving new file, and loosing link
tested softwares: Win Photos, MS Paint, Krita, Photoshop, Blender, Sublime Text, VS Code, Chrome, MS Edge
What happens with links on pasting files from dir1
<source> with same name (and type/nature) replacing the existing one in dir2
<target>
- Hardlink in
dir2
kept on COPYING file fromdir1
. Content indir2
updated to the one pasted in. - Symlink and Win Shortcut ein
dir2
kept link to <target>, updating content (thumbnail didn't).
- Target's link replaced by source's link, new shortcut points to "original image" of source's shortcut in
dir1
dir1
image's content updated to source's symlink image indir1
. Link kept between image and symlink ondir2
- original content change properly reflected on Hardlink and Win Shortcut (thumbnail didn't)
- target image's content replaced by source image in
dir1
- target Hardlink kept pointing to new image in
dir2
, replacing both 'files' content - original content change properly reflected on Symlink and Win Shortcut
- source image replaces target image
- source Hardlink in
dir1
kept pointing it in newdir2
directory - source Win shortcut remapped to source Hardlink
- target Hardlink consolidates as own file with the original content of
dir2
image - Symlink and Win Shortcut in
dir2
pointing same address, with the new content
- Hardlink lost on MOVING file. Consolidates as new files with original content
- Symlink and Win Shortcut kept it's links, content updated to the pasted one (thumbnail didn't).
- target Shortcut replaced, point to source image in
dir1
- Symlink and Hardlink not changed
- target Symlink point to
dir2
image. Internal relative address not changed - Final result equivalent to delete source's Symlink
- target Hardlink replaced by source one, point to
dir2
image - Symlink and Win Shortcut not changed