Skip to main content

Questions tagged [hard-link]

A hard link is file system entry that associates a name with another file on a file system.

0 votes
2 answers
63 views

How to programmatically deduplicate files into hard links while maintaining the time stamps of the containing directories?

Continuing https://unix.stackexchange.com/a/22822, how to deduplicate files, given as a list, into hardlinks, while maintaining the timestamps of their directories? Unfortunately, hardlinks changes ...
AlMa1r's user avatar
  • 260
1 vote
0 answers
26 views

How to get `rsync --link-dest=` hard-link moved/renamed files

I am trying to set up rsnapshot for backing up a remote server. However, I realize that my issue is with rsync (rsnapshot’s back-end), not with rsnapshot itself. Thus I am focusing the question on ...
Edgar Bonet's user avatar
11 votes
6 answers
2k views

Why are symbolic links more common than hard links in Unix/Linux? [closed]

I frequently find myself googling the difference between symbolic links and hard links. Each time, I conclude that hard links seem superior in most use cases, especially when Linux is my daily driver. ...
CouscousPie's user avatar
6 votes
1 answer
1k views

Is a filesystem without hard links practical as /home on Linux?

I have a novel filesystem in mind, but the structure makes it impossible to implement more than one hard link to each inode. ("." and ".." are handled differently.) It is not ...
fadedbee's user avatar
  • 1,083
0 votes
1 answer
65 views

How to Avoid Copying Large Folders When Creating a chroot Sandbox Using Symlinks, Hard Links, or Bind Mount?

I am working on creating a chroot sandbox and want to avoid the time-consuming and storage-intensive process of copying large directories such as bin, lib, and others. Is it possible to use symbolic ...
Foad's user avatar
  • 379
0 votes
0 answers
25 views

ls long listing column "number of hard links": What does that mean? [duplicate]

Please shed some light on that erratic, second column of ls -l, that numeric column between the 1st one - the permission string - and the third one - the user ownership. I just can't pin it down, what ...
futurewave's user avatar
3 votes
3 answers
295 views

Why hard link doesn't corrupt if we remove the original file? [duplicate]

Why the hard link doesn't corrupt if we remove the original file? If I remove the original file then the softlink gets corrupt but hard link doesn't so why it does't corrupt
user avatar
1 vote
1 answer
124 views

mirror a directory tree by hard links for file contents and symlinks for directory structure

what is the best way to mirror an entire directory, say original/, to a new directory, say mirror/, which has the structure mirror/data/ and mirror/tree/, such that every file in the directory ...
windfish's user avatar
  • 113
0 votes
2 answers
94 views

Creating hard links [duplicate]

$ ln fun fun-hard $ ln fun dir1/fun-hard $ ln fun dir2/fun-hard $ ls -1 total 16 drwxrwxr-x 2 me 4096 2018-01-14 16:17 dir1 drwxrwxr-x 2 me 4096 2018-01-14 16:17 dir2 -rw-r—-r—- 4 me 1650 2018-01-10 ...
user599592's user avatar
3 votes
1 answer
156 views

Hard link as destination of cp and rsync

Where do I find documentation of behavior of cp and rsync commands when the destination path shares the inode with another path? In other words, when I do $ cp [options] src dest $ rsync [options] src ...
norio's user avatar
  • 225
0 votes
2 answers
66 views

Creating a hard link increases the hard link count for two names

gui@Latitude:~$ cd playground gui@Latitude:~/playground$ ls -l total 8 drwxrwxr-x 2 gut gut 4096 set 20 16:18 dir1 -rw-r--r-- 1 gut gut 2903 set 20 14:46 gato gui@Latitude:~/playground $ ln gato gato-...
Guilherme Woolley's user avatar
-1 votes
1 answer
71 views

creating hard links Linux question [duplicate]

From the book The Linux Command Line by William Shotts, page 33: So now we have four instances of the file fun. Let's take a look at our playground directory. [me@linuxbox playground]$ ls -1 total 16 ...
Guilherme Woolley's user avatar
0 votes
0 answers
110 views

How do I get the number of hardlinks of a folder?

I am on Mac. However, I use gstat (GNU stat) so my understanding is that behavior should match linux. I cd to a folder. Then I use gstat --format=%h .. The output is 65. Next, I use gfind . -maxdepth ...
Matt Groth's user avatar
3 votes
1 answer
605 views

How does `ls` find hard links?

Setup The following sequence of commands is setup for my question. root@cd330f76096d:/# cd root@cd330f76096d:~# ls root@cd330f76096d:~# mkdir -p my_dir/my_subdir root@cd330f76096d:~# ls -...
Sweet Shell O'Mine's user avatar
0 votes
0 answers
52 views

archiver/backups does not save/restore hardlinks

I will explain what kind of hardlinks and where and why they appeared, and why to save them. pictures on the server are saved: ../foto/M/ay/uZbIKBgsXr0222858001661067986M ../foto/M/ay/...
Aliskin's user avatar
  • 121

15 30 50 per page
1
2 3 4 5
18