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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
29 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 ...
user avatar
5 votes
3 answers
1k 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....
user avatar
  • 251
6 votes
3 answers
180 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 ...
user avatar
0 votes
0 answers
129 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 ...
user avatar
0 votes
0 answers
150 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 ...
user avatar
  • 1
0 votes
0 answers
16 views

Can you use Windows search to filter by number of hardlinks of a file?

I just read this question and I wondered if you could do Type:~~Hardlink. I know it can be done in Powershell, but can I do it in the Windows search box, or if there is an equivalent search command? I'...
user avatar
1 vote
2 answers
31 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. ...
user avatar
1 vote
0 answers
20 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)...
user avatar
  • 1,109
0 votes
2 answers
105 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 ...
user avatar
  • 3
2 votes
1 answer
3k 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?
user avatar
0 votes
1 answer
42 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: ...
user avatar
2 votes
0 answers
120 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 ...
user avatar
  • 21
0 votes
1 answer
99 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 ...
user avatar
0 votes
2 answers
173 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 ...
user avatar
  • 7,225
1 vote
1 answer
142 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 ...
user avatar
-1 votes
2 answers
128 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 (...
user avatar
0 votes
0 answers
173 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 ...
user avatar
  • 101
0 votes
0 answers
1k 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: ...
user avatar
0 votes
1 answer
186 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 ...
user avatar
  • 291
1 vote
1 answer
492 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,...
user avatar
  • 1
1 vote
1 answer
274 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 ...
user avatar
  • 487
2 votes
2 answers
3k 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 ...
user avatar
  • 172
0 votes
1 answer
130 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 ...
user avatar
1 vote
0 answers
986 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 ...
user avatar
  • 3,214
1 vote
0 answers
50 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. ...
user avatar
  • 7,131
1 vote
1 answer
195 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. ...
user avatar
  • 7,131
0 votes
0 answers
769 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 ...
user avatar
1 vote
0 answers
99 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 ...
user avatar
18 votes
2 answers
9k 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 ...
user avatar
  • 1,169
2 votes
0 answers
72 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: ...
user avatar
  • 121
0 votes
2 answers
719 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 ...
user avatar
0 votes
0 answers
68 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?
user avatar
  • 2,154
2 votes
1 answer
50 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 ...
user avatar
  • 181
2 votes
0 answers
1k 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 ...
user avatar
  • 21
0 votes
1 answer
594 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 ...
user avatar
  • 333
1 vote
1 answer
326 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 ...
user avatar
1 vote
1 answer
421 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\...
user avatar
  • 695
0 votes
0 answers
75 views

How can I delete a folder with 65535 links?

Somehow a folder from /var/folders (/var/folders/2j/8_50ggln3wz21k4gmfx86drh0000gn/T/ on my machine) got 65535 links to it. This caused my machine to not boot anymore. I managed to fix the booting ...
user avatar
2 votes
1 answer
794 views

Sync files via OneDrive that are hardlinked to other locations

I use OneDrive to sync a script between multiple computers, including between my home and work machines. At work, we recently implemented separate logins for normal vs. admin access. This caused a ...
user avatar
  • 8,686
0 votes
0 answers
62 views

Hardlinked windows 10. Issues with windows updates and all standart metro apps

I have installed the fresh windows 10 and created hardlinks: C:\Program Files -> D:\ProgramFiles C:\Program Files(x86) -> D:\ProgramFiles(x86) C:\User -> D:\Users C:\ProgramData -> D:\ProgramData ...
user avatar
  • 31
1 vote
0 answers
306 views

Deleting hard-linked directory on macOS?

I have a directory on my macOS that I hard-linked to my Google Drive folder, using gln -d "path to directory" "path to Google Drive folder" If I try to remove the directory from my Google Drive ...
user avatar
  • 141
2 votes
1 answer
761 views

Why can't I hard link a certain file (Mac)?

I'm copy/linking files and have found that a certain file really does not like to be hard linked. Both gcp -alp Get_started_with_GoPro.url test (gnu-cp) and ln Get_started_with_GoPro.url test fail ...
user avatar
  • 303
2 votes
1 answer
2k views

How to create a hard link on a NTFS filesystem using Linux/Unix commands?

I have an NTFS backup hard drive and I want to perform incremental backups that utilize hard links to save storage space. When I try to link 2 files on the hard drive via a Linux OS (I'm currently ...
user avatar
1 vote
0 answers
440 views

How do I use the mklink command to create hard links for all files that end in a certain extension?

I want to construct a batch file to move certain file types from the Downloads folder to another folder I've designated for that filetype. And then, put a hardlink in the downloads folder for that ...
user avatar
  • 725
0 votes
1 answer
117 views

How are files added to multiple folders implemented in Google Drive sync?

I have a large amount of files in Google Drive, which I need to organize by different criteria. I'm planning to use the feature to add the same file to multiple folders (sort of like hard links in a ...
user avatar
0 votes
0 answers
318 views

Efficient `rm` of hard links?

Suppose these is a file foo. Then, suppose I create a hard link: ln foo bar I can delete bar by running rm bar. However, it looks like when there are lots and lots of hard links, using rm is as slow ...
user avatar
5 votes
1 answer
2k views

Recursively find files with specific hard link count

I have a "tracking" directory containing hardlinks to files/dirs in a second directory ( used for tracking moves/renames). If I delete something in the original folder, no disk space is freed as its ...
user avatar
  • 183
0 votes
0 answers
161 views

Upload files to Dropbox without being in Dropbox folder?

Assume I have my general dropbox folder, and my Photo/Video files in an another folder: /mnt/myhd/Dropbox /mnt/myhd/MyPhotosVideos Now, how can I upload all files from MyPhotosVideos to Dropbox ...
user avatar
  • 109
0 votes
1 answer
676 views

Can i use hard or symbolic links on a DVD which needs to be Mac and Windows readable?

I'm producing a DVD and want to try to save some space to fit it onto a single-layer disk rather than dual-layer. There are a lot of repeated files on there and it occurred to me that I could have a "...
user avatar
  • 2,639
2 votes
0 answers
175 views

On OS X, saving breaks hard links

I'm using OS X 10.10.5, and I'm seeing a strange issue with hardlinked files. When I update one of the linked files and save the change, the other linked file becomes blank -- a zero-byte file. This ...
user avatar