forked from likun7981/hlink
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
109 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ destDir* | |
sourceDir1 | ||
|
||
/docs/.vitepress/dist | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
--- | ||
title: 主命令 | ||
--- | ||
|
||
# hlink | ||
|
||
待补充 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# 快速开始 | ||
|
||
## 介绍 | ||
|
||
hlink 是一个批量快速硬链工具,全称为`hard link`,能够帮你快速的建立你的硬链接,在保种的同时,能够刮削电影相关的资料等 | ||
|
||
## 如何使用 | ||
|
||
首先你需要安装`nodejs`,目前最新版本的`hlink`需要`12.20`以上或者`14.14`以上的`nodejs`版本[如何安装nodejs](../install/nodejs.md)。 | ||
安装nodejs完成后,使用以下命令 | ||
```bash | ||
$ npm i -g hlink | ||
``` | ||
完成hlink的安装,最简单的使用 | ||
|
||
```bash | ||
$ hlink /path/to/download /path/to/movie | ||
``` | ||
|
||
更多使用技巧见 [hlink使用介绍](../command/index.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,27 @@ | ||
# 为什么是hlink | ||
|
||
## 什么是硬链接 | ||
|
||
直接翻看百度百科 [什么是硬链接?](https://baike.baidu.com/item/%E7%A1%AC%E9%93%BE%E6%8E%A5/2088758) | ||
|
||
## 系统命令`cp -lr`的缺陷 | ||
|
||
大家都知道系统自带的命令`cp -lr`可以快速批量建立硬链接,但是它有以下几个问题 | ||
|
||
- 硬链建立后,如果硬链接改名,则又会被重复硬链 | ||
- 没有黑名单、白名单、缓存机制,只能一把梭 | ||
- 建立后,很难维护源文件和硬链接的关系,比如源文件删除后,很难找到硬链接的位置 | ||
|
||
## hlink的优势 | ||
|
||
- **重复检测**:`hlink` 重复检测是通过文件的`inode`号来进行检测,大家可以通过 `ls -i` 查看文件的`inode`。只要文件内容没有改变,则`inode`不会改变,刚好对应各种电影、动漫、电视剧视频文件的内容肯定是不会变更的,所以硬链接后则内容不会改变,那么`inode`不会改变,便可用于重复检测 | ||
|
||
 | ||
|
||
- **黑白名单机制**:如何过滤非视频文件,则可用黑白名单来进行管控需要硬链的文件,这样保证`PT种子`内部的文本文件不会被硬链过去,持续保种 | ||
- **缓存机制**:部分视频文件观看后,需要删除。但是不希望下次继续硬链过来,则可以打开缓存,再下次硬链时自动排除这些缓存的文件 | ||
- **更友好的提示**:硬链过程中,会有`进度提示`,失败后会有`错误提示` | ||
|
||
 | ||
|
||
- **同步机制**:硬链创建后,可以通过`hlink prune`来同步源文件和硬链文件,更简单的管理它们,更详细的使用见[hlink prune介绍](../command/prune.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# 如何安装hlink | ||
> 安装完nodejs后 | ||
## 首次安装 | ||
执行以下命令即可完成安装 | ||
|
||
```bash | ||
$ npm i -g hlink | ||
``` | ||
|
||
|
||
## 更新 | ||
|
||
在`[email protected]`以后,只要有版本更新则会有更新提示 | ||
|
||
 | ||
|
||
更新命令同 安装命令 一样 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# 如何安装nodejs | ||
|
||
## 威联通 | ||
待补充 | ||
|
||
## 群晖 | ||
待补充 | ||
|
||
## unraid | ||
待补充 | ||
|
||
## Windows | ||
待补充 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"type": "commonjs" | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ | |
"bin": { | ||
"hlink": "./lib/cli.js" | ||
}, | ||
"type": "module", | ||
"engines": { | ||
"node": ">=12" | ||
}, | ||
|