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.
189
questions
1
vote
0
answers
27
views
Creating hard links from and to the same network volume
I am trying to populate a folder with a "copy" of files from a fairly complicated and deep folder structure. So I do not duplicate the files I want to use hardlinks to the original files.
...
0
votes
0
answers
21
views
Is there a way to display icons on Hard Links, similar to how there's a blue arrow for Junctions?
If you manually create a test directory. Then cd into it and type the following:
echo Test > test.txt
mkdir TempTesting
cd TempTesting
mklink /H linkTest.txt "../test.txt"
The ...
0
votes
1
answer
104
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
246
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
520
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
19
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
53
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
201
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
1k
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
262
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
185
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
557
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
159
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
21k
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 ...
1
vote
0
answers
1k
views
Why is a file having 0 hard links?
I need to access a file using Java and I get NoSuchFileException.
The file seems to have 0 hard links. The file however has an associated inode number.
I am able to use the inode number to find the ...
0
votes
0
answers
1k
views
How can directories have only 1 hard link?
When doing ls -al, the second column (just after the permissions) is the number of hard links. For files, I find this clear. My problem is with directories.
I read that it is not possible to create ...
1
vote
2
answers
57
views
Why hard-linked texts are linked but images are not? The images act like different files
I used mklink /H 2.txt 1.txt to create a hard link of 1.txt. When I changed one file, the other file was changed, too. But when I did the same thing for a PNG image file, the changes were not shared. ...
1
vote
0
answers
39
views
Backup a hard drive and keep hardlinks in win10
I have 2 hard drives. Drive D used 802GB.
C: 119GB Crucial_CT128MX100SSD1 (SATA (SSD))
D: 931GB Seagate ST1000DM010-2EP102 (SATA )
Mother board: Gigabyte Technology Co. Ltd. GA-73PVM-S2H (Socket 775)...
0
votes
2
answers
1k
views
How to delete a hardlink?
Note: I am no good in superuser or system administration. So I don't even know whether the statement of Title is correct or not.
So, I had to use python2 for a particular project but my Windows system ...
6
votes
1
answer
21k
views
How does Robocopy handle file system links (symbolic links, hard links and junctions)?
Is it safe to delete a Robocopy backup? I have read that some people accidentally deleted files outside of the backup because it contained links/junctions. Can I prevent this?
0
votes
1
answer
552
views
How do I create a hard link/junction for multiple folders pointing to a single folder?
Example:
D:\Comp\
this directory has these folders -
Volume 1
Volume 2
Volume 3
I want to point Volume 1 and Volume 2 to one folder, and Volume 3 to another such that everything looks like this:
...
2
votes
0
answers
512
views
How could i make a mirrored (sync) hard link copy of files from different folders on windows?
I'm trying to create hard link entries from a folders content into another folder, but synced in such a way that any files deleted from one (or the target) will be deleted from the other.
There is one ...
0
votes
1
answer
411
views
how to link (with mklink) existing 'pictures' folder with already existing 'pictures' folder in onedrive
This might sound a bit complicated. I need to explain the history of my problem.
Few years ago I found a helpfull hint to get your local pictures folder included in onedrive by adding a hard link ...
1
vote
2
answers
586
views
Convert hardlinks to reflinks
I have nested folders with a bunch of files inside that are hardlinked to each other. I would like to break the hardlinks (convert them into separate files), but then immediately convert each pair ...
1
vote
1
answer
729
views
Why do files with multiple hard links lose 'Authenticated Users' read/write access (and how to make not happen)?
After playing with hard links on a test Win7 system after receiving a fantastic answer by community member Pimp Juice IT to another question (Is there a clever way to group a bunch of files together ...
-1
votes
2
answers
480
views
Writing files over network on another machine
I have the following scenario:
CentOS machine which downloads files (e.g., wget, or any software that tries to save to local disk)
Ubuntu machine which contains the storage for the downloaded files (...
1
vote
1
answer
578
views
How to remove file with hard link 0
I've tried to remove linux files from windows but they hadn't been deleted.
I tried to remove from Ubuntu terminal but get "permission denied"
I set chown $USER:$USER and chmod 777 for parent ...
1
vote
0
answers
5k
views
Mount folder on MacOS
I want to mount a folder (specifically mount not soft link) in macOS Catalina.
I tried:
mount -t ufs <path to src folder> <path to dst where I want my mount point>
I got in return:
...
0
votes
1
answer
625
views
Directory junction equivalent for ext4
In the NTFS, directory junctions used as hard links for a directory. However, on the ext4 file system, no such equivalent exists (to accomplish this task, you have to make a symbolic link). Is there ...
1
vote
2
answers
1k
views
Windows archive symbolic links
Is Windows able to store Symbolic links or Hard links in archive files?
I see 7-Zip has these options:
-snh : store hard links as links
-snl : store symbolic links as links
but trying them with Zip,...
3
votes
1
answer
1k
views
Getting and understanding a listing of NTFS links
I've been learning about NTFS links (1, 2) and playing around with them on my computer. It's a strange world of pseudonyms for filenames and folder names, and I'm not clear yet on why I have them, but ...
5
votes
2
answers
12k
views
Create recursive hardlink of entire folder
First of all, I know that you can't create hardlinks of a folder.
I was wondering if there was any command (linux) that could automatically (and recursively) create the subsequent folder-tree at the ...
1
vote
1
answer
430
views
How to enumerate all hard link paths of a certain inode without traversing an entire filesystem in Linux?
I would like to know all paths that has the same inode number, I found ls - List all files with the same inode number? - Unix & Linux Stack Exchange however the answer involves traversing the ...
2
votes
1
answer
4k
views
SnippingTool.exe not located where it appears to be?
I just bought a new SteelSeries mouse. I'm trying program button 6 to launch "SnippingTool.exe".
SnippingTool.exe appears to be located at "C:\windows\system32\SnippingTool.exe" or at least it shows ...
1
vote
0
answers
161
views
rsync hard linking bug when using -R?
Following on File copy tools that will preserve hard links at destination, I found the problem is not at copying hard linked files to another volume part, but the source hard linked files themselves.
...
1
vote
1
answer
894
views
File copy tools that will preserve hard links at destination
rsync has a --hard-links option:
-H, --hard-links
This tells rsync to look for hard-linked files in the source and
link together the corresponding files on the destination. ...
0
votes
0
answers
1k
views
rsync link-dest does not link even the content in the comparison directory is the same to the source directory
I found the "rsync --link-dest" behaves differently depending on how I created the comparison directory. If the comparison directory was created by a "cp" command, the "rsync --link-desk" does the ...
1
vote
0
answers
242
views
create date folder version backups with hard links and a combined view
I am using the ideas laid out in this article to create incremental versioned backups of my data. I basically sync the data to a current folder in my backup destination and then create a date folder ...
28
votes
3
answers
19k
views
Can I hard link files with rsync instead of copying them?
cp -l hard links files instead of copying them, saving filesystem space. I need to use rsync instead of cp because of its --exclude capabilities.
So my question is, how do I get rsync to hard link ...
2
votes
0
answers
79
views
How to know the actual number of bytes that will be freed if I delete a directory with unsaturated hardlinks
I need to know the real space a directory is using in Windows. By real space I mean the number of bytes that will be freed up if I remove the directory with the Windows explorer.
In other words:
...
1
vote
2
answers
1k
views
pros and cons of incremental vs differential backup? [closed]
Back In Time says it saves full copies of changed files. And it links unchanged files via hardlinks. So this is a incremental backup.
What are Pros and Cons of an incremental backup (like done with ...
0
votes
0
answers
70
views
Move SoftwareDistribution Windows update folder [duplicate]
I have to free some space in my small SSD with Windows 10, can I move SoftwareDistribution folder of windows updates to another volume using link?
If yes, may I use symbolic, hard or junction?
2
votes
1
answer
57
views
How to remove multiple links to the same directory?
I have a broken lxd installation and want to completely delete it and start over, but there's a problem. /var/lib/lxd/devices/desktop contains a bunch of subdirs that are linked to directories ...
3
votes
0
answers
2k
views
How to delete all hardlinks to the same file (inode)?
I've used Link Shell Extension to create a bunch of hardlinks in different directories within the same hard drive (to save space, as I need both stored in different locations). When I want to delete ...
0
votes
1
answer
764
views
hardlink/symlink with mapped drives in Server 2003
I'm trying to create a hardlink on a Windows Server 2003 system using fsutil hardlink create M:\docs L:\docs but am receiving a message stating "The FSUTIL utility requires a local NTFS volume. I ...
2
votes
1
answer
611
views
Which hard link determines the file's actual location? [duplicate]
In my understanding a file, as I can see it in file explorer, is basically a hard link to the actual data. When I move this to another directory, the data is moved as well to that location. What ...
1
vote
1
answer
546
views
Deleting Hardlink To System File On Win10
I have hard links into system files advapi32.dll, kernel32.dll and etc.
I have used MoveFileEx API for deletion with MOVEFILE_DELAY_UNTIL_REBOOT, it basically uses HKEY_LOCAL_MACHINE\SYSTEM\...