Questions tagged [hard-link]
A hard link is file system entry that associates a name with another file on a file system.
256
questions
0
votes
1
answer
25
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 ...
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 ...
2
votes
3
answers
167
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
1
vote
1
answer
66
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 ...
0
votes
2
answers
89
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 ...
0
votes
0
answers
40
views
Copy new files (or their hard links) to new location with other folder structure and with new name
I hope someone can advise me on a very tedious, repeating task. My university uses Moodle as its eLearning and file exchanging platform. So every now and then our tutors upload new files, that I have ...
3
votes
1
answer
119
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 ...
0
votes
2
answers
58
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-...
-1
votes
1
answer
69
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
...
0
votes
0
answers
38
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 ...
3
votes
1
answer
349
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 -...
0
votes
0
answers
47
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/...
23
votes
5
answers
5k
views
Is '..' really a hard link?
This is a bit of a theoretical question, but it's important to use proper names for things.
In UNIX/Linux file systems, .. points to the parent directory.
However, we know that hard links cannot point ...
0
votes
1
answer
169
views
Hard links on a mounted disk
I have a work laptop that I will soon have to return to my employer. Having foreseen this, I ordered a second internal disk and mounted it at /home/<user> so that I can just pull it out and ...
1
vote
2
answers
1k
views
How to make hardlinks across two NFS shares?
Is there a way to make hard-links, from the client side, across two or more NFS mounts, if the shared NFS directories are hosted on a single backing filesystem? (Such that the server would have no ...