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.

learn more… | top users | synonyms

2
votes
1answer
2k views

Using hard links to move Windows Users folder

I'm currently trying to move bulky folders from my SSD to my HDD (my Users folder and ProgramData folder). I'm following a short guide on using Directory Junctions to do this effectively. However, ...
1
vote
1answer
695 views

Why don't hard link destinations on Windows Server 2003 immediately show the proper file size and last modified time?

I wanted to create hardlinks to files on Windows Server 2003 and I stumbled upon the superuser question hardlinks on ntfs with windows. I tried mklink as one of the answers suggested and found that ...
1
vote
1answer
109 views

Dropbox won't detect edited files using Remote GIT bare repository folder and ssh

Here's the situation... I develop under windows8 and I have some projects, every project, with a specific local git repository For each local repository I have a remote bare repository on my VPS (I ...
0
votes
3answers
92 views

directory in /proc/sys/net/ipv4/config have no hard links?

Why the directories inside /proc/sys/net/ipv4/config have no hard links? ls -l /proc/sys/net/ipv4/conf total 0 dr-xr-xr-x 0 root root 0 Dec 31 08:27 all dr-xr-xr-x 0 root root 0 Dec 31 08:27 default ...
5
votes
2answers
2k views

How do I delete a hard link to an executable I don't own?

I used the following command to create a hard link to an executable: ln `which xcrun` gcc The link worked as expected. However, it seems I don't have the permissions to remove it. $ rm gcc ...
0
votes
0answers
56 views

How many hardlinks in a drive?

I made a backup of one of my external drives to another. They are both NTFS filesystems. I moved ALL disk contents into a folder called a and right clicked to get file/folder/size count. They are ...
1
vote
1answer
230 views

Synchronize folder on network, preserving hard links

I have few computers using Windows XP Pro. I want to synchronize/back a folder from one machine, to another one. This far, It's a simple problem, and I've used FreeFileSync for such operations, with ...
0
votes
0answers
380 views

fsutil can't create more than 4 hard links to a file in win srv 2003?

I got an error message when I created 5th hard link to a file using fsutil: Error: An attempt was made to create more links on a file than the file system supports. I was quite surprised ...
1
vote
1answer
4k views

Create a hardlink from the network

I'm trying to create an NTFS hardlink over a network drive: I'm using Windows an XP SP3 workstation mapped drive F: over a Windows 7 Server with net use f: \\server\shared_folder then I try ...
6
votes
2answers
7k views

How can I find all hardlinked files on a filesystem?

I need to find all hardlinked files on a given filesystem. E.g. get a list of files, each line contains linked pairs, or triplets, etc. I understand more or less how to do it, one needs to create a ...
1
vote
0answers
201 views

Which filesystems support hard links (rsync) to backup a Mac?

I want to make a rsync-style hard-link backup from Mac on an external hard drive, but I cannot decide for a file system. It should be (preferably natively) readable from other operating systems. ...
2
votes
2answers
723 views

Make hard links as I copy a directory

I would like to create a bat file to copy a directory, with everything in it (sub-directories, including hidden directories) - by making hard links. I tested xcopy %source% %destination% /E /C /R /I /...
1
vote
0answers
263 views

shortcut to recursively copying a directory preserving modes, ownerships and hard and symbolic links

I am using the following to recursively copy a directory while preserving modes, permissions as well as hard and symbolic links: cp -pr --preserve=links dir-a dir-b However I have the following ...
1
vote
1answer
329 views

bash :: visually distinguishing hard links on ls

I am using bash shell in Ubuntu precise. I am partial to symbolic links in bash even when a hard link would make more sense because they can be more easily identified with an ls. In contrast, for ...
0
votes
2answers
169 views

Is it possible to create a file and a hardlink to it without initializing the data?

I want to create a file of 2GB, but I don't care about the contents of it. I currently use dd with /dev/zero, but this is fairly slow. Is it possible to create a file and a hardlink to it, without ...
2
votes
0answers
175 views

Efficient mirroring of directories using hardlinks

I'm backing up my music collection on to a number of NTFS-formatted external hard-drives; however, as I store my main collection in FLAC and have my library on my laptop as MP3s to save space, I want ...
1
vote
1answer
256 views

Identify files that would be deleted when removing an rsync --link-dest directory?

I have a Time Machine-style backup system set up on my NAS (running BusyBox v1.16.1), using rsync --link-dest as described here: http://blog.interlinked.org/tutorials/rsync_time_machine.html Is there ...
0
votes
2answers
851 views

7-zip archive with hard links?

I see that tar respects hard links $ ln clonezilla.iso test.iso $ tar cfvvJ archive.tar.xz *.iso -rw-r--r-- Steven 111149056 2012-03-25 07:34 clonezilla.iso hrw-r--r-- Steven 0 2012-03-25 ...
2
votes
2answers
2k views

Windows hard link taking up space?

On my computer I create a hard link mklink /h git-link.exe git.exe Hardlink created for git-link.exe <<===>> git.exe Now they both take up space 2012-04-17 12:14 AM 6,905,039 ...
2
votes
1answer
642 views

Generate a list of files by piping output of find command into another find command?

I need to generate a list of files for use in a shell script. The list should be all files (in a specified directory) that are hardlinked. I want to replace the hardlinks with symlinks. (Obviously, ...
0
votes
1answer
431 views

ls link count seems incorrect - how do I ensure I'm not deleting the inode contents?

ls -lai on a file gives me a link count of 2: 16508 -rw-rw-rw- 2 ... Then looking for all the filenames returns only one: find "$dir" -inum 16508 This lists only the original file, not two. What'...
0
votes
1answer
277 views

How to improve this bash shell script for turning hardlinks into symlinks?

This shell script is mostly the work of other people. It has gone through several iterations, and I have tweaked it slightly while also trying to fully understand how it works. I think I understand it ...
1
vote
1answer
2k views

Can rsync preserve hard link across file systems?

I'd like to back up my data preserving hard link to a network drive connected through cifs. Is it possible? My system is Linux (EXT4) and I have two network drives: one is also Linux (EXT4) and the ...
4
votes
2answers
667 views

What are the pitfalls of hardlinked files on my desktop PC?

All the identical-content files on my PC are now hardlinked. (My data is completely de-duplicated. It is a consequence of the way I copied my data from my old computer.) What pitfalls do I need to ...
5
votes
2answers
616 views

What operations breaks the hardlinks?

I have a file "a.txt" and its hardlink "ha.txt". If I open either of those files in notepad and save any changes it would appear in both files as they are still linked. But if I overwrite (copy) a.txt ...
2
votes
3answers
5k views

Make hard-link from Windows' Desktop to cygdrive

When I open Cygwin, I want that I can see the Desktop -folder (I do not want to move its original location, I think the thing I want is hard-link with ln -cmd -- but not sure, this is my first idea to ...
3
votes
2answers
178 views

Windows hard links for directories

How can I make hard links for directories in Windows 7? That means that the 2 (or more?) linked directories refer to the same inode (group of inodes) so they will be exact duplicated and every change ...
3
votes
1answer
664 views

Is it possible to delete a hardlink to a locked file?

In short, I need to do what was asked here: One hardlink is locked. How do I remove the other? The given solution doesn't work for me as I'm trying to create/delete a hardlink to a file that is in ...
0
votes
1answer
1k views

Find modified files from rsync backup script

I'm using rsync on my Ububtu Linux server to take a time machine like backup of the system. Every hour, a cronjob runs the following script (partial excerpt): rsync -a --link-dest=/backup/current --...
3
votes
2answers
190 views

hardlinking takes a lot of space

I made an rsync incremental backup script for my server that will copy a MySQL database backup and a specified folder path to a remote server. Here's the code on Github. Code excerpt from lines 53-57:...
4
votes
3answers
2k views

How to transfer a Time Machine to an NTFS partition (or how to copy HFS+ hard links)

Do you know a way to copy HFS+ hard links to a folder on a HFS+ or NTFS drive? Before you say it can't be done, I don't want actual backing up functionality of Time Machine, just the ability to ...
4
votes
2answers
371 views

Hard/SymLinks and Alternate Data Streams

An interesting thought just occurred to me while thinking about NTFS. NTFS supports hard links, symbolic links, and Alternate Data Streams. Is it possible for an ADS to be a link to another file? ...
15
votes
5answers
9k views

How can I find hard links on Windows?

I've created some hard links on my Windows 7 file system using mklink. It was some time ago and I can't remember for sure where, or which files. When I use Explorer, all files look the same. When I ...
1
vote
1answer
165 views

rsync: how to recreate hard-links after removed and recreated a file?

This is what I have: --dir1 ----file1 ----file2 Then I created another directory dir2 with hard-links. --dir2 ----file1 (hard link to dir1/file1) ----file2 (hard link to dir1/file2) Now I ...
2
votes
2answers
115 views

Netbeans destroys hardlinks on save

I am using Netbeans 7.0.1 on a Linux system. I have a file module/test.php and another one application/module/test.php Both test.php files are hardlinks of each other. When I change application/...
0
votes
2answers
1k views

How can I create hard links in OSX?

What I want is to have multiple copies of the same file, and whenever I edit one of them, they all get updated. I thought Hard Links would solve my problem. So, I used the command ln as described in ...
43
votes
4answers
7k views

What are the various link types in Windows? How do I create them?

Is it possible to link two files or folders without having a different extension under Windows? I'm looking for functionality equivalent to the soft and hard links in Unix.
1
vote
2answers
3k views

How to copy files and create hardlinks instead of copying when files are identical

Are there any tools for Windows that can copy one dir to another read copied content generate MD5 if the current file is identical to a previously copied one, create a hardlink in destination dir ...
6
votes
1answer
5k views

How to create a directory hard link in Windows?

I was trying to create a directory hard link (not a symbolic one). I've tried this: mklink /d /h newfolder currentfolder but it's telling me Access is denied. I don't understand how is access denied ...
3
votes
1answer
908 views

What happens when I backup a symbolic link to a briefcase?

The story: I recently started trying DropBox. After some fiddling, I found I could use an app, DropBoxFolderSync, to sync a folder with DropBox, leaving something called a "Symbolic Link" (which seems ...
4
votes
2answers
1k views

What is “ln -L” (--logical) for?

I can read in the ln man page: -L, --logical make hard links to symbolic link references I read somewhere that ln -L could be used to re-link files that were deleted but which are ...
2
votes
1answer
480 views

Can someone make sense out of “Hard Links and Junctions” article from MSDN?

At Hard Links and Junctions MSDN article one can read the following: A hard link is the file system representation of a file by which more than one path references a single file in the same ...
1
vote
2answers
203 views

Should I use Windows' hardlinks for backups?

I'm not exactly backing up but its a similar idea. I have a few archives on my computer. They have exact copies of certain files (mostly 300k to 1.5MB). It's enough to take up a gigabyte. I am using ...
1
vote
1answer
468 views

How do I get Windows 7 to recognize a Junctioned User folder?

I'd like to junction or hard-link my C:\Users[me]\ folder to a folder on my D: drive for space reasons. This has worked for me in the past, but after a recent reformat/reinstall of Win7 x64, Windows ...
5
votes
1answer
1k views

Why does du -sl show different sizes for the source and result of a cp -rl?

I have used cp -rl to copy a folder. When measuring the size of the source and of the result of the copy du -sl returns slightly different sizes, even though diff confirms that their content are ...
5
votes
2answers
3k views

Windows 7 mklink - hard link's attributes (expected !) + contents do not affect the linked file

Now - this is driving me crazy. I created a hard link pointing to a file in my dropbox dir - the link was created inside a folder where this file needs to be in order to be accessed by the programs I ...
3
votes
1answer
72 views

Virtual join-directory on Windows

Problem: Say I have a video spanned over 2 files (vid001.avi & vid002.avi) and each file is on a seperate CD/DVD. If the 2 files are in the same directory my player will automatically play the ...
3
votes
4answers
2k views

How to properly store dotfiles in a centralized git repository

I'd like to put all my dotfiles (like .profile, .gitconfig, etc.) in a central git repository, so I can more easily keep track of the changes. I did this, but I would like to know how to properly ...
8
votes
3answers
8k views

How do you create a working Hard Link in OSX?

Ok, this has me banging my head. In OS X, to create a hard link, in a terminal window, you're supposed to be able to just type this... ln a.txt b.txt ...and this should create a hard link from a....
0
votes
2answers
709 views

How to get all hardlinks to the same data?

Have several hardlinks to the same file. How (for example) by one file(hardlink) get others pointing to the same data? No real task. Just interesting. May be useful.