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.
186
questions
1
vote
0
answers
382
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 ...
2
votes
1
answer
942
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 ...
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 ...
1
vote
0
answers
677
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 ...
0
votes
1
answer
119
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 ...
0
votes
0
answers
419
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 ...
8
votes
1
answer
3k
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 ...
0
votes
0
answers
179
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 ...
0
votes
1
answer
833
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 "...
2
votes
1
answer
259
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 ...
0
votes
1
answer
107
views
How can I delete these leftover hard links?
I was working with many small files (about 1million) and for one reason or another had to create a bunch of hard links to them. Now I am trying to delete all this data, but can't. After removing the '...
1
vote
1
answer
321
views
Hard links break in Windows 7 Pro
I want to use hard links to avoid having to sync/copy a few source files between their base folders and a small git repo for personal development.
C:\PathLink>mklink /h test C:\PathTarget\file....
1
vote
1
answer
272
views
hard link to share files in git osx
I am trying to share a config file ~/.spacemacs in a git repository ~/repo/config/spacemacs.
Since I am on osx, I installed hardlink and used it like :
➜ ~ hln ~/.spacemacs ~/repo/config/spacemacs
...
0
votes
2
answers
346
views
Can't run a program through a link?
I'm working on a Windows 8.1 machine, fully patched, except for the Get Windows X malware. I have Android's SDK installed at C:\android-sdk, but its not on-path. I'm trying to avoid putting 2 SDK ...
1
vote
0
answers
248
views
Hardlink on same drive gives error about different drive
I'm using mklink /h to create a hardlink from "d:\some folder" to "d:\some other folder" and Windows 7 is telling me "The system cannot move the file to a different disk drive." But it's NOT a ...
-1
votes
1
answer
124
views
Can I hardlink my desktop folder to a different partition so I can put big files on it?
Correct me if I'm wrong, but a hardlink is esentially like a shortcut that can trick applications to think it is a real folder. It allows you to specify an application to point to a shortcut to save ...
2
votes
1
answer
338
views
How to make an exact copy of a directory to an another partition?
I have a 20Gb folder on an ntfs drive. How can I make an exact of only that folder to an another ntfs volume?
By exact, I mean, copy pemissions; keep directories hard links (if any); and keep ...
0
votes
1
answer
274
views
How to Count Hard Links, Symbolic links, and Junctions on an Ntfs Volume
I know of some programs that claim to count one or the other, but I don't know of any that can count all three. I would like to count all three and print out a list like so:
Hard Links: 123
...
1
vote
1
answer
1k
views
Best method to copy big partition contents with many hard links
We had a LVM of almost 16TB with ReiserFS. We now want to add more disks, but we cannot continue using ReiserFS, as it has a maximum capacity of 16TB. This volume is being used to make incremental ...
13
votes
5
answers
10k
views
Copy to another NTFS disk and preserve hard links
I have to copy directory structure from one local NTFS disk to another (Windows 7+) and preserve hard links that exist within this directory structure.
An acceptable solution would be to replace hard ...
0
votes
1
answer
542
views
Hard Links in Windows - risk of file-loss?
I am now creating hard links to remove duplicate space usage in backup data.
This is within single NTFS partitions.
I am afraid of data-loss - losing a file completely if one link reference is broken,...
7
votes
1
answer
3k
views
Rsync backups on btrfs very slow
My environment is Ubuntu 15.04 with kernel 3.19.0-28-generic and Btrfs v3.17.
I have two identical external USB hard disks that I use with my backup script. One of them is formatted with btrfs and ...
37
votes
6
answers
17k
views
How to replace all duplicate files with hard links?
I have two folders containing various files. Some of the files from the first folder have an exact copy in the second folder. I would like to replace those with a hard link. How can I do that?
3
votes
1
answer
5k
views
Editing the hardlink doesn't edit the original file
I have a file at D:\JavaScript\CheckIban.js, and I want to reuse it in many places without duplicating it. Because when I fix a bug (change its content) I need that change to be propagated to all ...
0
votes
2
answers
257
views
Transparently split file | Hardlink to file part
I have really big file (TrueCrypt container) and I want to save it in some cloud, but it has constraint on file size, limiting to 2 Gb, also it has some tool to sync directory. The idea is to create ...
1
vote
1
answer
3k
views
"cannot create hard link X to Y: Operation not permitted" on ext2 drive from cygwin cp -al
/cygdrive/d/ is a USB hard disk formatted as ext2 and mounted with ext2fsd.
When I try cp -al /cygdrive/d/X /cygdrive/d/Y where X is a file, I get the error in the title.
Things I've Tried/Verified
...
0
votes
1
answer
385
views
How to merge directories of hardlinks potentially pointing to the same files?
I've used a file deduplicator on a large folder with hundreds of thousands of files. The deduplicator created hardlinks for all duplicate files that it detected.
If I was to attempt to merge some ...
-1
votes
2
answers
805
views
What happens in linux when you copy a hardlink on top of another hardlink to the same file?
I've used a file deduplicator on a large folder with hundreds of thousands of files. The deduplicator created hardlinks for all duplicate files that it detected.
If I was to attempt to merge some ...
0
votes
1
answer
413
views
Redirect opening requests about a file in a given directory to another file in another directory
I have a simple scenario, but i don't now is there a way in Windows to do it or not:
We have 2 directory with these files:
Book:
D:\sources\Books
|___ A.pdf
|___ ...
1
vote
1
answer
681
views
How to check that all files in a file system are can be read without errors?
I'm using an external hard drive with an ext4 file system to make backups. The backup software I use (faubackup) copies the file hierarchy 1:1 into a timestamp-named folder on the hard drive, and ...
7
votes
1
answer
478
views
Does Time Machine preserve hard links yet?
I have been doing my own backups using rsync to a remote computer. However, due to the recommendation to have a full computer backup before upgrading to OS X 10.10 Yosemite, I am trying to undertake ...
0
votes
0
answers
162
views
Find real size of Windows/winsxs folder in Cygwin
I'm running Cygwin with the default installation. I'm a complete noobie to Linux & Cygwin. I just figured out how to find all hardlinked files in my c:\windows\winsxs folder. (Navigate to /...
3
votes
3
answers
1k
views
How do I list the files in a directory that are hardlinks in windows
I'm trying to work with backups and new versions of backups and I want to check if files listed in a directory are already hardlink alias to some file or if they are the last link to that content.
...
1
vote
1
answer
69
views
Linking multiple folders into a single folder so that relative paths work. (Fedora)
I have a SVN repo that has a structure that does not line up with the needed relative build paths.
The SVN repo directory looks kinda like this
root
alpha
trunk
p1
p2
p3
tag
branch
bravo
...
0
votes
0
answers
473
views
All of the NTFS hard links damaged, where are those 0kb hardlinks stored and how to recover them?
This is Windows 7 x64 sp1 on a NTFS file system.
All hardlinks within C:\Windows\System32 folder disappear, and the Windows can't boot, because even the osloader, C:\Windows\System32\boot\Winload.exe ...
2
votes
1
answer
643
views
replace hard links with copies
I have a file which has other hard links. I want to let it become independent.
I know it can be done like this:
mv myfile temp
cp -a temp myfile
Is there any single command which does not require a ...
0
votes
1
answer
185
views
Is there a way to catch all invokations of hardlink creation and replace them with symbolic links?
Assume I have a program or build script (consider it a blackbox) which is creating hardlinks and run on Linux (Debian 7.4). If I want to experiment and find out whether the program would work with ...
4
votes
2
answers
822
views
Can mklink make portable links?
Is there any way to create portable links in NTFS using mklink?
Or it there a better solution?
I want to be able to distribute an application in a zip file or folder copy where there is one "real" ...
9
votes
3
answers
51k
views
How to create a hard link in Windows using mklink command?
I've no problem in creating junctions and symbolic links through mklink, but can't create hard link using this command. It returns "Access denied", have tried on both Windows 7 and 8.1 on different ...
4
votes
1
answer
2k
views
Is there a difference between the original file and a hard link to it?
I'd like to synchronise some configuration files via a file hoster like Dropbox. I could create a hard link in the software's configuration folder and let it point to my cloud storage directory.
When ...
0
votes
1
answer
95
views
Inheritance system for folders (symlinks?)
Okay, here's the scenario.
I have a base folder "Base" that has a blank, multipurpose template. However, this template is 12 gigabytes. I want to be able to have an inheritance system where linked ...
0
votes
1
answer
100
views
Replace NTFS hardlinks with files
I deduplicated backup files on an NTFS partition. I would like to know if there is a way to reduplicate the files so that they can be edited individually.
Current:
/dir1/file1
/dir2/file1 -- hard ...
1
vote
2
answers
580
views
Safe to delete a folder named "~" [duplicate]
I program I was using to out put some files apparently did not understand the short cut "~" (directory) very well and has done some trickery that has me confused.
Rather than put the files where I ...
2
votes
2
answers
1k
views
How is it that symbolic links can be used across different filesystems, and hard links cannot?
How is it that symbolic links can be used to link across different filesystems? And why is that hard links cannot be used across different filesystems?
1
vote
1
answer
325
views
How can I archive directories containing hardlinks?
I am supporting a legacy Windows 2000 system that contains a number of hardlinks on a shared ntfs drive. We have run out of space on the shared drive and want to know the best way to archive some of ...
7
votes
5
answers
3k
views
Could hardlinks be used for backup deduplication purposes?
I know about full backups, incremental backups and decremental backups. However, I wondered why nobody (Windows Backup, TrueImage, Paragon) seems to have implemented the following backup algorithm.
...
0
votes
1
answer
2k
views
Changing specific shared library of linux executable
I'm building an android application on a GNU/Linux based server and aapt is complaining that lib/libz.so.1 is out of date:
/lib/libz.so.1: no version information available (required by .../aapt)
I'...
16
votes
5
answers
37k
views
How to delete Windows NTFS hard link (mklink /h) while original is in use?
On a Windows NTFS file system, I have a file (say, orig.mp3). I open this file, through this path orig.mp3, in such a way that it is in use (say, by playing it in VLC).
Then I create a hard link (...
3
votes
1
answer
1k
views
copying a file to a hard link
I recently got bit by a misbehaving in a bash script of mine and was wondering:
is this the expected system behavior, or is it a bug
what are the ideal workarounds
Essentially, the problem boiled ...
2
votes
1
answer
539
views
Why the link between .. and the parent dir is hardlink?
I just noticed that the link between .. and the parent dir is hardlink, they have the same inode number:
starpinker@host /home/starpinker/unix $ ls -ail
8200794 drwxrwxr-x 2 starpinker starpinker ...