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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
45 views

I'm trying to copy a bunch of files (around 50000) from an include-file list. THe include-file has relative path to the files on the source folder. I'm using the following command : rsync -avPilHAXWE \...
François-Xavier Payet's user avatar
0 votes
2 answers
116 views

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
  • 1
11 votes
6 answers
3k views

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
0 votes
1 answer
104 views

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
3 votes
3 answers
380 views

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
0 votes
2 answers
123 views

$ 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
0 votes
2 answers
77 views

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
0 votes
0 answers
155 views

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
0 votes
0 answers
64 views

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
0 votes
1 answer
510 views

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 ...
Bob's user avatar
  • 3
3 votes
2 answers
213 views

The operation I'm trying to do is take directory 1: Dir1 Dir A File A Dir B File B Then use the find command to check every file in Dir 1 for whether or not they have an ...
GeneralTully's user avatar
1 vote
1 answer
2k views

Is there a way to list all hardlinks, by path/filename, or even just by file name alone, that point to a given inode? I have a file that ls -al reports has three hardlinks, but it should only have two....
DasKraut's user avatar
0 votes
1 answer
5k views

This command - run as Admin (not Root) in directory /volume2/Media/AllOurMedia/1 Our Pictures/Cataloged ( 3-5): cp -l HL_Test.JPG /volume2/phototest/ got this response: cp: cannot create hard link '/...
Bones's user avatar
  • 1
0 votes
3 answers
2k views

I'm controlling a Linux based NAS through SSH on a Windows computer. What I'm trying to do is use the cp -al command to rapidly copy folders from one directory to another, hardlinking all the files ...
GeneralTully's user avatar
0 votes
0 answers
237 views

After installing timeshift on Kali Linux, the same device/drive with a different name/path was created as seen in the system monitor under the File Systems tab: Even after uninstalling timeshift, the ...
ayush7ad6's user avatar
1 vote
1 answer
744 views

Some time ago I wanted to be able to access files in a directory which was overshadowed by later mount point. I recall finding several QAs on SE giving answers, but I recall none I've tried worked. ...
Martian2020's user avatar
  • 1,483
0 votes
1 answer
542 views

Can one force ln not to follow a soft link in its first argument? For example, in the following I would like hard to be a hard link to the soft link soft: $ mkdir dir $ ln -s dir soft $ ln soft hard ...
Olius's user avatar
  • 103
1 vote
2 answers
2k views

I use rsync for incremental backups of my folder /hi AND I use --link-dest=[some.server]/hi. Lets say I have 1000 photos in a folder /hi/there, which is backed up on my server with rsync. Now I move ...
martin-tct's user avatar
1 vote
2 answers
2k views

I have multiple subfolders and some of them contain hardlinks to other subfolders: # mkdir /tmp/data # mkdir /tmp/foo # mkdir /tmp/foo/bar # mkdir /tmp/foo/baz # truncate -s 10M /tmp/foo/bar/file1 # ...
mgutt's user avatar
  • 557
1 vote
1 answer
2k views

Assuming I have a file structure like this: ├── Project-1/ │   ├── files/ │   └── special-files/ ├── Project-2/ │   ├── files/ │   └── special-files/ └── Project-3/ ├── files/ └── special-...
nath's user avatar
  • 6,094
2 votes
1 answer
483 views

I know how hard links and symlinks work and I know why hard links can't be used for directories but in this case, is it some kind of exception? For example I do: ls -al Documents total 8 drwxr-xr-x ...
pjk's user avatar
  • 323
2 votes
1 answer
500 views

On openSUSE Tumbleweed 20210606 with kernel GNU/Linux 5.12.9-1-default I tried making a hard link of file from /cust to ~/backup: df /cust && df ~/backup && ln -P /cust/customization....
rikuri's user avatar
  • 23
0 votes
1 answer
227 views

This is something I imagine I might have to submit a patch or feature request for, but I'd like to know if it is possible to create a hardlink to a file, that when that hardlink which was not the ...
Jannies - They do it for free's user avatar
0 votes
2 answers
2k views

I have a large directory structure that has many hard links from the first hard link which lives in a different directory structure. For example dir1 has the following structure : [dir1]$ tree . ├── ...
moth's user avatar
  • 307
1 vote
2 answers
1k views

How do you write a bash one-liner that will find binary files with identical contents, permissions, and owner on the same ext4 file-system, from the current working directory recursively, and replace ...
Himadri Ganguly's user avatar

1
2 3 4 5 6