You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
TRaSH-Guides/docs/Hardlinks/Check-if-hardlinks-are-work...

74 lines
2.4 KiB

# How to check if hardlinks are working
You've followed the guide step by step but still want to check if hardlinks are working, or someone on the Sonarr/Radarr support team asked you to check if your files are hardlinked?
You can use 3 options to check if you got working hardlinks.
chore(editorconfig): Add more extensions (#1410) * Add more extensions to editorconfig Signed-off-by: Eric Nemchik <eric@nemchik.com> * feat(editorconfig): update indent size * Revert "feat(editorconfig): update indent size" This reverts commit 30e5918efe499ebf05559b19bdb140e75bd0d31b. * style: :lipstick: format json files Signed-off-by: Eric Nemchik <eric@nemchik.com> * style: :lipstick: format yaml files Signed-off-by: Eric Nemchik <eric@nemchik.com> * style: :lipstick: format md files Signed-off-by: Eric Nemchik <eric@nemchik.com> * style: :lipstick: format other files Signed-off-by: Eric Nemchik <eric@nemchik.com> * style: :lipstick: format md files Signed-off-by: Eric Nemchik <eric@nemchik.com> * fix: :bug: markdownlint fixes Signed-off-by: Eric Nemchik <eric@nemchik.com> * fix: :bug: markdownlint fixes Signed-off-by: Eric Nemchik <eric@nemchik.com> * fix: :bug: markdownlint fixes Signed-off-by: Eric Nemchik <eric@nemchik.com> * fix: :bug: editorconfig lint fixes Signed-off-by: Eric Nemchik <eric@nemchik.com> * feat: :rocket: deploy preview Signed-off-by: Eric Nemchik <eric@nemchik.com> * feat: :rocket: deploy preview Signed-off-by: Eric Nemchik <eric@nemchik.com> * feat: :rocket: deploy preview Signed-off-by: Eric Nemchik <eric@nemchik.com> * revert: :fire: remove deploy preview Signed-off-by: Eric Nemchik <eric@nemchik.com> * fix: :bug: fix incorrect prior merges Signed-off-by: Eric Nemchik <eric@nemchik.com> * style: :lipstick: change json to 2 spaces Signed-off-by: GitHub <noreply@github.com> * style: :lipstick: format json to 2 spaces Signed-off-by: GitHub <noreply@github.com> * update(formatting/py): run pep8 formatting --------- Signed-off-by: Eric Nemchik <eric@nemchik.com> Signed-off-by: GitHub <noreply@github.com> Co-authored-by: FonduemangVI <15520607+FonduemangVI@users.noreply.github.com> Co-authored-by: FonduemangVI <michael.thomas@vualtlabs1226.com> Co-authored-by: zakary <zak@ary.dev>
6 months ago
_All methods require you to login to your terminal with PuTTY or similar software._
!!! warning
chore(editorconfig): Add more extensions (#1410) * Add more extensions to editorconfig Signed-off-by: Eric Nemchik <eric@nemchik.com> * feat(editorconfig): update indent size * Revert "feat(editorconfig): update indent size" This reverts commit 30e5918efe499ebf05559b19bdb140e75bd0d31b. * style: :lipstick: format json files Signed-off-by: Eric Nemchik <eric@nemchik.com> * style: :lipstick: format yaml files Signed-off-by: Eric Nemchik <eric@nemchik.com> * style: :lipstick: format md files Signed-off-by: Eric Nemchik <eric@nemchik.com> * style: :lipstick: format other files Signed-off-by: Eric Nemchik <eric@nemchik.com> * style: :lipstick: format md files Signed-off-by: Eric Nemchik <eric@nemchik.com> * fix: :bug: markdownlint fixes Signed-off-by: Eric Nemchik <eric@nemchik.com> * fix: :bug: markdownlint fixes Signed-off-by: Eric Nemchik <eric@nemchik.com> * fix: :bug: markdownlint fixes Signed-off-by: Eric Nemchik <eric@nemchik.com> * fix: :bug: editorconfig lint fixes Signed-off-by: Eric Nemchik <eric@nemchik.com> * feat: :rocket: deploy preview Signed-off-by: Eric Nemchik <eric@nemchik.com> * feat: :rocket: deploy preview Signed-off-by: Eric Nemchik <eric@nemchik.com> * feat: :rocket: deploy preview Signed-off-by: Eric Nemchik <eric@nemchik.com> * revert: :fire: remove deploy preview Signed-off-by: Eric Nemchik <eric@nemchik.com> * fix: :bug: fix incorrect prior merges Signed-off-by: Eric Nemchik <eric@nemchik.com> * style: :lipstick: change json to 2 spaces Signed-off-by: GitHub <noreply@github.com> * style: :lipstick: format json to 2 spaces Signed-off-by: GitHub <noreply@github.com> * update(formatting/py): run pep8 formatting --------- Signed-off-by: Eric Nemchik <eric@nemchik.com> Signed-off-by: GitHub <noreply@github.com> Co-authored-by: FonduemangVI <15520607+FonduemangVI@users.noreply.github.com> Co-authored-by: FonduemangVI <michael.thomas@vualtlabs1226.com> Co-authored-by: zakary <zak@ary.dev>
6 months ago
You can't create hard links for directories :bangbang:
You can't cross file systems :bangbang:
---
## Usenet
!!! note ""
If you use usenet these examples won't work because you make use of instant moves/atomic moves and not hardlinks.
Still want to test if it works ?
Test a import of a 4k remux (or any other big file and you should notice it's almost instant) and not a slower and more I/O intensive copy + delete.
## Method 1: Using ls
This is the easiest to check in my opinion.
In your terminal `cd` to your download location and run `ls -al` or type `ls -al /path/to/your/download/location/`
You will get a listing of all your files and on the left side you will see a couple of numbers, every file with a number above 1 are hardlinks.
![!Hardlinks check ls -al](images/hardlinks-ls-al.png)
- Red rectangle - Not Hardlinked
- Green rectangle - Hardlinks
- Blue rectangle - Folders/Directories you will need to go in to them to check if the files are hardlinked.
---
## Method 2: Using stat
This way requires a bit more work.
- In the terminal type: `stat /path/to/your/download/location/file.mkv`
- In the terminal type: `stat /path/to/your/media/location/file.mkv`
You will get 2 results you can use to compare several things.
![!Hardlinks check stat](images/hardlinks-stat.png)
1. Links: Everything above 1 means it's a hardlink
1. Inode: if the numbers match you know the files are hardlinked
## Method 3: Using Inode copies
- In your terminal `cd` to your download location and run `ls -i file.mkv` or type `ls -i /path/to/your/download/location/file.mkv`
This will reveal the inode of your file on the left side of the file.
![!Hardlinks check ls -i](images/hardlinks-ls-i.png)
- In your terminal type: `find /mnt/user/data/ -inum ###` or `find . -inum ###` if you're in your root folder.
!!! note ""
chore(editorconfig): Add more extensions (#1410) * Add more extensions to editorconfig Signed-off-by: Eric Nemchik <eric@nemchik.com> * feat(editorconfig): update indent size * Revert "feat(editorconfig): update indent size" This reverts commit 30e5918efe499ebf05559b19bdb140e75bd0d31b. * style: :lipstick: format json files Signed-off-by: Eric Nemchik <eric@nemchik.com> * style: :lipstick: format yaml files Signed-off-by: Eric Nemchik <eric@nemchik.com> * style: :lipstick: format md files Signed-off-by: Eric Nemchik <eric@nemchik.com> * style: :lipstick: format other files Signed-off-by: Eric Nemchik <eric@nemchik.com> * style: :lipstick: format md files Signed-off-by: Eric Nemchik <eric@nemchik.com> * fix: :bug: markdownlint fixes Signed-off-by: Eric Nemchik <eric@nemchik.com> * fix: :bug: markdownlint fixes Signed-off-by: Eric Nemchik <eric@nemchik.com> * fix: :bug: markdownlint fixes Signed-off-by: Eric Nemchik <eric@nemchik.com> * fix: :bug: editorconfig lint fixes Signed-off-by: Eric Nemchik <eric@nemchik.com> * feat: :rocket: deploy preview Signed-off-by: Eric Nemchik <eric@nemchik.com> * feat: :rocket: deploy preview Signed-off-by: Eric Nemchik <eric@nemchik.com> * feat: :rocket: deploy preview Signed-off-by: Eric Nemchik <eric@nemchik.com> * revert: :fire: remove deploy preview Signed-off-by: Eric Nemchik <eric@nemchik.com> * fix: :bug: fix incorrect prior merges Signed-off-by: Eric Nemchik <eric@nemchik.com> * style: :lipstick: change json to 2 spaces Signed-off-by: GitHub <noreply@github.com> * style: :lipstick: format json to 2 spaces Signed-off-by: GitHub <noreply@github.com> * update(formatting/py): run pep8 formatting --------- Signed-off-by: Eric Nemchik <eric@nemchik.com> Signed-off-by: GitHub <noreply@github.com> Co-authored-by: FonduemangVI <15520607+FonduemangVI@users.noreply.github.com> Co-authored-by: FonduemangVI <michael.thomas@vualtlabs1226.com> Co-authored-by: zakary <zak@ary.dev>
6 months ago
`###` = Your inode number on the left of the file you found.
![!hardlinks inode](images/hardlinks-inode.png)
It will list all files linked with the same inode number.