Questions tagged [hardlink]
A hard link is a directory entry that associates a name with a file or directory on the file-system, in effect creating an alias that may reside elsewhere on the file-system.
187
questions
0
votes
1
answer
67
views
In Linux with limited features (NAS box), how can I find duplicate files, then remove duplicates and substitute hardlinks to one file?
I have a NAS box running some version of Linux that I use for backing up anything and everything.
It is essentially an absolute certainty that some of the files are identical duplicates.
That being ...
1
vote
2
answers
164
views
Restore huge file from shadow copy without copying
I have a volume with a shadow copy. The shadow copy contains a very big file (let's say 100 GB). The shadow copy is on the same disk as the volume it is shadowing. The "original" file got ...
0
votes
0
answers
474
views
ln: failed to create hard link | No such file or directory - Even when file exists
Running Ubuntu 22.04.3 LTS using a Samba share (Version 4.17.12-Debian) running on Proxmox.
The command: ln "/mnt/drive/downloads/movie.mkv" "/mnt/drive/movies/movie/movie.mkv"
The ...
0
votes
0
answers
18
views
Hard Links Not Updating when I Rerun STATA script
I have created a hard and symbolic between the output file for one STATA script to the input file for the next script. I would like that when I run the first script and the output file is updated the ...
1
vote
1
answer
50
views
Link folders in shared drive
I'm a kinda new sysadmin and a user asked if it would be possible to optimise this process:
He works on department A and creates documentation in this structure:
\server\department_a\projectx\...
0
votes
1
answer
189
views
Resilient file or directory linking or automatic link updating?
Is there a file or directory link method that would be dynamic/resilient against target change?
I mean if I create a link mklink /d test c:\test I can change the link name after but not rename/move ...
11
votes
1
answer
2k
views
Is there a way to make changes to an NTFS hard-linked file be written to a new file?
A single NTFS file can be "hard linked" to multiple directory entries; all the directory entries (e.g. A, B, C) point to the same data. If a change is made to this single file (e.g. A), all ...
0
votes
4
answers
951
views
How do I create hardlinks in a destination directory to each file in a source directory, using Powershell?
I've tried using the New-Item cmdlet with -ItemType Hardlink but I haven't succeeded in getting the right parameters (whether -Name, -Path, -Value, -Target). I've tried piping the source files to New-...
1
vote
1
answer
238
views
Are /var/mail/root and /var/spool/mail/root hardlinks for the same inode?
Just found out this:
# diff /var/mail/root /var/spool/mail/root
# (nothing)
# ls -i /var/mail/root /var/spool/mail/root
1284 /var/mail/root 1284 /var/spool/mail/root
Same content, same 1284 inode ...
2
votes
1
answer
167
views
paste hard link to file on clipboard into focused folder using keyboard shortcut
I would like to copy a file to the clipboard, then highlight a desired destination folder in Windows File Explorer, then press a keyboard shortcut to paste a hard link to that file into that ...
0
votes
1
answer
514
views
Windows Command line batch script to get data from different source files
I'm trying to do a script which would take data from multiple source files. I want to create Hardlinks from filename1 refering to filename2. It means the script will take 1st row (file path) from ...
0
votes
0
answers
146
views
What does [...] mean for Reparse Point Target when dir /al is executed
When I execute dir \al (Attribute: Reparse Points), I get a result that lists reparse points. The following output is easy enough to understand with columns being Date Modified, Time Modified, Dir ...
0
votes
0
answers
36
views
How can I create a hard link to a directory in Windows? [duplicate]
A comment at How to create a directory hard link in Windows? states it is "technically possible" to create a hard link to a directory, but so far I have not found anything about how to ...
11
votes
3
answers
20k
views
Operation not permitted when creating hard link (but soft link works)
I'm trying to create a hard link but get an error message "Operation not permitted"
tikey@helios64:/data/$ ln /data/dir1/img1.jpg /data/dir2/
ln: failed to create hard link '/data/dir2/img1....
7
votes
4
answers
2k
views
How to safely recursively delete a directory in Windows?
NTFS supports all kinds of links including junctions, hard links, soft links, etc. so here's a problem.
Let's say you're recursively deleting a directory which actually contains the above things. It's ...