likun7981 / hlink Goto Github PK
View Code? Open in Web Editor NEW批量、快速硬链工具(The batch, fast hard link toolkit)
Home Page: https://hlink.likun.me
License: MIT License
批量、快速硬链工具(The batch, fast hard link toolkit)
Home Page: https://hlink.likun.me
License: MIT License
删硬链接目标文件自动同步删源文件。
减少删资源繁琐步骤。
深坑勿扰,哈哈哈。
(^_^)
实测一级目录下的合规文件没有链接到,二级以下都正常链接。
环境:win10 20h2
终端:git bash
hlink版本:npm i -g hlink@next
如图所示:https://i.niupic.com/images/2022/01/07/9SVZ.png
配置:
// 重要说明路径地址都请填写 绝对路径!!!!
export default {
/**
* 源地址
*/
source: 'E:/下载/PT/AV',
/**
* 目标地址
*/
dest: 'E:/porn/AV',
/**
* 需要包含的后缀名,如果不配置该项,会采用以下策略
* 1. 配置了excludeExtname,则链接文件为排除后的其他文件
* 2. 未配置excludeExtname,则链接文件为目录下的所有文件
*/
includeExtname: ['mp4', 'flv', 'f4v', 'webm',
'm4v', 'mov', 'cpk', 'dirac',
'3gp', '3g2', 'rm', 'rmvb',
'wmv', 'avi', 'asf', 'mpg',
'mpeg', 'mpe', 'vob', 'mkv',
'ram', 'qt', 'fli', 'flc', 'mod', 'iso'],
/**
* 需要排除的后缀名, 如果配置了includeExtname则该配置无效
*/
excludeExtname: [],
/**
* 0:保持原有的目录结构
* 1:只保存一级目录结构
* 默认为 0
* 例子:
* - 源地址目录为:/a
* - 目标地址目录为: /d
* - 链接的文件地址为 /a/b/c/z/y/mv.mkv;
* 如果保存模式为0 生成的硬链地址为: /d/b/c/z/y/mv.mkv
* 如果保存模式为1 生成的硬链地址为:/d/y/mv.mkv
*/
saveMode: 0,
/**
* 是否打开缓存,默认关闭
*
* 打开后,每次硬链后会把对应文件存入缓存,就算下次删除硬链,也不会进行硬链
*/
openCache: false,
/**
* 是否为独立文件创建同名文件夹,默认创建
*/
mkdirIfSingle: true,
}
只用后缀名过滤还不完美。
某些制作组的压制资源,带有预告片或者花絮,后缀名也是媒体。
实际上我们链接的影库不需要这些。
如果有文件大小过滤就能过滤掉大多数。
同时提议文件大小过滤可以按不同文件后缀单独设置,方便视频、音乐、图书等资源的不同过滤需求。
新版本的说明和体验 见 :#42
新版本大家有问题都回复到下面
请问命令中加上 -l 或者 -e这种options类命令不生效,会直接执行最基础的硬链接,请问是我添加的命令有问题吗?
hlink -l=2 /volume3/NAS电影盘4/自动化追剧/TCCF/功勋.Medal.of.the.Republic.2021.WEB-DL.2160p.H265.AAC-BtsTV /volume3/NAS电影盘4/自动化追剧/电影和电视剧/电视剧/功勋
有没有可能实现硬链接同时按规则改名?
比如电视剧自动识别集数并且改名成SxxExx。
windows好像不是很支持,报错了
RUN THE COMMAND BY ROOT: hlink "/volume1/movie/TV/" "volume1/movie/TVNEW"
Error: Command failed with exit code 1 (EPERM): ln /volume1/movie/TV/斛珠夫人.Novoland.Pearl.Eclipse.2021.1080p.WEB-DL.H264.AAC-OurTV/斛珠夫人.Novoland.Pearl.Eclipse.2021.E16.1080p.WEB-DL.H264.AAC-OurTV.mp4 /root/volume1/movie/TVNEW/斛珠夫人.Novoland.Pearl.Eclipse.2021.1080p.WEB-DL.H264.AAC-OurTV
at makeError (/usr/local/lib/node_modules/hlink/node_modules/execa/lib/error.js:59:11)
at Function.module.exports.sync (/usr/local/lib/node_modules/hlink/node_modules/execa/index.js:187:17)
at /usr/local/lib/node_modules/hlink/lib/index.js:141:61
at step (/usr/local/lib/node_modules/hlink/lib/index.js:52:23)
at Object.next (/usr/local/lib/node_modules/hlink/lib/index.js:33:53)
at /usr/local/lib/node_modules/hlink/lib/index.js:27:71
at new Promise ()
at __awaiter (/usr/local/lib/node_modules/hlink/lib/index.js:23:12)
at /usr/local/lib/node_modules/hlink/lib/index.js:80:65
at Array.forEach () {
command: 'ln /volume1/movie/TV/斛珠夫人.Novoland.Pearl.Eclipse.2021.1080p.WEB-DL.H264.AAC-OurTV/斛珠夫人.Novoland.Pearl.Eclipse.2021.E16.1080p.WEB-DL.H264.AAC-OurTV.mp4 /root/volume1/movie/TVNEW/斛珠夫人.Novoland.Pearl.Eclipse.2021.1080p.WEB-DL.H264.AAC-OurTV',
exitCode: 1,
exitCodeName: 'EPERM',
stdout: '',
stderr: 'ln: failed to create hard link ‘/root/volume1/movie/TVNEW/斛珠夫人.Novoland.Pearl.Eclipse.2021.1080p.WEB-DL.H264.AAC-OurTV/斛珠夫人.Novoland.Pearl.Eclipse.2021.E16.1080p.WEB-DL.H264.AAC-OurTV.mp4’ => ‘/volume1/movie/TV/斛珠夫人.Novoland.Pearl.Eclipse.2021.1080p.WEB-DL.H264.AAC-OurTV/斛珠夫人.Novoland.Pearl.Eclipse.2021.E16.1080p.WEB-DL.H264.AAC-OurTV.mp4’: Invalid cross-device link',
failed: true,
timedOut: false,
isCanceled: false,
killed: false,
signal: undefined
}
[HLINK WARN]: 当前文件 斛珠夫人.Novoland.Pearl.Eclipse.2021.E16.1080p.WEB-DL.H264.AAC-OurTV.nfo 不满足配置条件, 跳过创建
[HLINK WARN]: 当前文件 斛珠夫人.Novoland.Pearl.Eclipse.2021.E17.1080p.WEB-DL.H264.AAC-OurTV.mp4.part 不满足配置条件, 跳过创建
[HLINK WARN]: 当前文件 斛珠夫人.Novoland.Pearl.Eclipse.2021.E18.1080p.WEB-DL.H264.AAC-OurTV.mp4.part 不满足配置条件, 跳过创建
[HLINK WARN]: 当前文件 斛珠夫人.Novoland.Pearl.Eclipse.2021.E19.1080p.WEB-DL.H264.AAC-OurTV.mp4.part 不满足配置条件, 跳过创建
[HLINK WARN]: 当前文件 斛珠夫人.Novoland.Pearl.Eclipse.2021.E20.1080p.WEB-DL.H264.AAC-OurTV.mp4.part 不满足配置条件, 跳过创建
[HLINK WARN]: 当前文件 斛珠夫人.Novoland.Pearl.Eclipse.2021.E21.1080p.WEB-DL.H264.AAC-OurTV.mp4.part 不满足配置条件, 跳过创建
[HLINK WARN]: 当前文件 斛珠夫人.Novoland.Pearl.Eclipse.2021.E22.1080p.WEB-DL.H264.AAC-OurTV.mp4.part 不满足配置条件, 跳过创建
[HLINK WARN]: 当前文件 斛珠夫人.Novoland.Pearl.Eclipse.2021.E23.1080p.WEB-DL.H264.AAC-OurTV.mp4.part 不满足配置条件, 跳过创建
[HLINK WARN]: 当前文件 斛珠夫人.Novoland.Pearl.Eclipse.2021.E24.1080p.WEB-DL.H264.AAC-OurTV.mp4.part 不满足配置条件, 跳过创建
[HLINK INFO]: 硬链创建完毕... 总数 427 条
[HLINK INFO]: 成功 0 条
[HLINK INFO]: 失败 113 条
[HLINK INFO]: 跳过 314 条
[HLINK INFO]: 跳过之前的创建记录 0 条, 如果需要重新创建,请在删除或编辑文件 /root/.hlink/cache.json
UNRAID环境中使用,写了个简单的Dockerfile
FROM node:16-alpine
RUN npm i -g hlink
ENTRYPOINT [ "hlink" ]
构建镜像后,运行下面的命令就可以创建硬链接了,仅供参考
docker run --rm -v /mnt:/mnt sjtuross/hlink /mnt/user/media/source /mnt/user/media/dest
删了源文件,能自动删除硬链接就好了。
如果能新增一个删除选项,选择确认后程序开始扫描已删除源文件,识别到就自动删除已链接的文件,不用手动删一次。
如题,之前由于理解错误,把配置文件中的opernCache打开了,后面移走或删除了硬链没有再次生成了,请问一下如何解决?
因为个人习惯在qb下载的时候添加!qB后缀标识未完成的文件,并且不额外设置未完成的文件保存路径(避免文件下载完成后移动文件)。
为了避免自动硬链接的时候将未完成的文件也进行硬链接,想对!qB后缀进行黑名单过滤,但是发现实际未生效,测试其他常用后缀nfo,jpg等未出现该问题。
全是错误代码:[HLINK ERROR]: Error: Command failed with exit code 1 (EPERM)
群晖918+ SSH里使用HLINK的命令,文件夹都能过去 文件一个过不去~~
当前硬链结果只显示统计数据,没有具体成功与失败的文件列表,不方便找到原因。
因此希望结果能够更加详细,列出具体成功的文件,与失败的文件。
Script location: /tmp/user.scripts/tmpScripts/auto hlink/script
Note that closing this window will abort the execution of this script
internal/process/esm_loader.js:74
internalBinding('errors').triggerUncaughtException(
^
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader. Received protocol 'node:'
at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:782:11)
at Loader.resolve (internal/modules/esm/loader.js:85:40)
at Loader.getModuleJob (internal/modules/esm/loader.js:229:28)
at ModuleWrap. (internal/modules/esm/module_job.js:51:40)
at link (internal/modules/esm/module_job.js:50:36) {
code: 'ERR_UNSUPPORTED_ESM_URL_SCHEME'
}
/mnt/user/domains/node-v16.14.2-linux-x64/bin/hlink -e=jpg,png,bmp /mnt/user/download_media/download/Disc/ /mnt/user/download_media/media/Movies/Disc/
在shell窗口运行没有问题,在userscript中自动运行提示最上面的错误。
这个功能大部分情况下确实很方便,不过有时候多个文件还是想先硬链接完以后再手动放到一个文件夹下,这样增加了多余的无谓的工作量。 希望可以把这个功能做成可选的。
环境为unraid nodejs 版本为14.17.3
TypeError: Cannot read property 'join' of undefined
at Object.parseConfig [as default] (/mnt/user/appdata/nodejs/node-v14.17.3-linux-x64/lib/node_modules/hlink/lib/config/parseConfig.js:26:40)
at Object.<anonymous> (/mnt/user/appdata/nodejs/node-v14.17.3-linux-x64/lib/node_modules/hlink/lib/utils/parse.js:144:47)
at step (/mnt/user/appdata/nodejs/node-v14.17.3-linux-x64/lib/node_modules/hlink/lib/utils/parse.js:52:23)
at Object.next (/mnt/user/appdata/nodejs/node-v14.17.3-linux-x64/lib/node_modules/hlink/lib/utils/parse.js:33:53)
at fulfilled (/mnt/user/appdata/nodejs/node-v14.17.3-linux-x64/lib/node_modules/hlink/lib/utils/parse.js:24:58)
module.exports = {
source: '',
dst: '',
icludeExtname: ['mp4', 'flv', 'f4v', 'webm',
'm4v', 'mov', 'cpk', 'dirac',
'3gp', '3g2', 'rm', 'rmvb',
'wmv', 'avi', 'asf', 'mpg',
'mpeg', 'mpe', 'vob', 'mkv',
'ram', 'qt', 'fli', 'flc', 'mod', 'iso'],
excludeExtname: [],
maxFindLevel: 4,
saveMode: 0
}
套件可以正常加入使用,docker刮削刮不到,提示无视频
好东西👍。建议把常见的视频格式都加上,挂PT啥玩意儿都遇见过
比如我PT下载做种在一个文件夹,然后QB删除了这个种子和相关的文件。那么硬链接那边我直接在文件夹里右键删除就行,还是敲命令指定那个文件再删除?请问这两种有什么区别么?
主要是想知道会不会有什么未知问题,或者留下一堆垃圾文件一类的。
Hlink的缓存关闭了。
win10
映射的网络驱动器
git bash
报错信息如下:
Only file and data URLs are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
node.js版本:12.20
#43
1.后缀名判定规则没能忽略大小写,发现有一批后缀大写.MKV没链到。(部分后缀名命名不规范媒体会识别不到。)
2.硬链以后改动路径的话,自动过滤会失效。比如tmm刮削以后,文件夹被改名或者文件夹结构被更改,这种情况自动过滤会失效。(tmm以及其他刮削器的重命名整理功能,会导致路径改变。)
3.希望加入一个功能,已经链接过,但是已删除了链接文件的,下次不再链接,自动过滤掉。(部分媒体只想做种,不想加入媒体库,比如一些纯保种的720p资源。)
硬链接.mkv这类文件彻底解决了刮削使得.nfo这类文件改变导致的红种问题。不过有些种子自带了刮削文件,建议增加一个复制(非硬链接).nfo类文件到dst的功能。这样对于自带刮削文件的种子来说,操作之后在dst文件夹内既有.mkv文件,也有.nfo文件,可以使用自带的刮削信息,同时可以避免如果之后播放器重新刮削导致.nfo文件变化红种(因为是复制过来的,所以在dst内修改.nfo文件并不会影响源文件)
有个一个文件夹,包含子文件大概几万个吧
创建时,速度会随着时间越来越慢。。。
到后来大概十几秒才会成功一个
二刺螈用户表示收的番剧文件夹里会有CDs,SPs这类二级文件夹,并不想把它们也进行硬链接,试过改目录层级,但又会影响这种
XXX剧集(一级目录)
s1(二级目录)
>xxx.mkv(三级目录)
s2(二级目录)
xxx.mkv(三级目录)
结构的文件夹进行链接。
hlink prune 基准路径 目标路径
如果把路径定义成基准和目标,感觉就不需要reverse了,而且便于理解
所有硬链接的文件都是指向同一块数据,不用去想谁是源文件,谁是硬链接
单位可以是KB 或者MB ,因为有的种子可能自带nfo和cover。 这些文件如果链接了可能会被刮削时覆盖掉。 也避免了手动删除这些文件的步骤。
感谢大佬
大佬 现在有过滤文件夹的功能了嘛? 因为有时候pt下载了多个版本的电影用来做种,而需要emby识别的只有其中的一个
运行建立硬链接的时候报错,提示:Command failed with exit code 1 (EPERM)
Error: Command failed with exit code 1 (EPERM): ln /opt/movie/avdc/failed/mywife-1702.mp4 /opt/vdieo/failed
at makeError (/usr/local/lib/node_modules/hlink/node_modules/execa/lib/error.js:59:11)
at Function.module.exports.sync (/usr/local/lib/node_modules/hlink/node_modules/execa/index.js:187:17)
at /usr/local/lib/node_modules/hlink/lib/index.js:200:19
at Array.forEach ()
at start (/usr/local/lib/node_modules/hlink/lib/index.js:159:22)
at /usr/local/lib/node_modules/hlink/lib/index.js:164:17
at Array.forEach ()
at start (/usr/local/lib/node_modules/hlink/lib/index.js:159:22)
at hardLink (/usr/local/lib/node_modules/hlink/lib/index.js:221:3)
at Object. (/usr/local/lib/node_modules/hlink/cli.js:63:1) {
command: 'ln /opt/movie/avdc/failed/mywife-1702.mp4 /opt/vdieo/failed',
exitCode: 1,
exitCodeName: 'EPERM',
stdout: '',
stderr: "ln: failed to create hard link '/opt/vdieo/failed/mywife-1702.mp4' => '/opt/movie/avdc/failed/mywife-1702.mp4': Invalid cross-device link",
failed: true,
timedOut: false,
isCanceled: false,
killed: false,
signal: undefined
如题,如果想在docker容器内部使用hlink,要怎么安装呢
我用avdc刮削之后目录格式发生变化了,但是文件名字没有变化,简单来说就是一个文件夹变到了另一个文件夹里面,建议加上对目标目录校验,慢点也没啥关系。不然每次都要自己鉴别有点麻烦
当视频文件名中含有 空格或 '
例如:
Guess.Who's.Coming.to.Dinner.1967.720p.BluRay.DD5.1.x264-DON.mkv
Grandma 2015 1080p BluRay DTS x264-VietHD.mkv
程序使用 ls -i 查看硬链接 会提示 no such file or directory导致报错并跳过创建硬链接
.js 配置中,includeExtname
的配置为
['mkv','iso']
而命令行中,则不能带中括号,如果写了中括号,则筛选不正确。
hlink -i='mkv','ios'
希望二者能保持一致。
source 目录 A 目录原本的文件结构如下:
A
|-B
|-B1.mp4
首先对 A 执行了 hlink,正确在 target 目录下生成了目录 B 和其下文件 B1.mkv 的硬链接。
然后向 A 中添加了新目录 C 和文件 C1.mkv,A目录结构变为:
A
|-B
|-B1.mp4
|-C
|-C1.mkv
重新运行 hlink,log 中提示
[HLINK WARN]: 源地址 A/B/C/C1.mkv 硬链已存在, 跳过创建
此时 target 目录下文件无变化,仍只有目录 B 和文件 B1.mkv。
请问这个问题可能出在哪呢?
另外,如果方便的话可以麻烦谈谈是如何做到“重复硬链检测”功能的么?我对 js 不大了解,没找到或者没看明白相应的代码段... 谢谢
hlink 版本为8月22日使用 npm 安装的版本,最大查找层级能够覆盖到相应文件。
hlink 配置如下:
[HLINK INFO]: 配置检查完毕...
[HLINK INFO]: 当前为 白名单 模式
[HLINK INFO]: 当前配置为:
[HLINK INFO]: 源地址: /volume2/TVshow/source
[HLINK INFO]: 目标地址: /volume2/TVshow
[HLINK INFO]: 包含的后缀有: mp4,flv,f4v,webm,m4v,mov,cpk,dirac,3gp,3g2,rm,rmvb,wmv,avi,asf,mpg,mpeg,mpe,vob,mkv,ram,qt,fli,flc,mod,iso
[HLINK INFO]: 最大查找层级为: 6
[HLINK INFO]: 硬链保存模式: 保持原有目录结构
由于威联通重启后,会重置某些系统配置,包括 /root 目录。hlink 目前创建的配置文件,是放在了 /root 目录下,威联通重启后,会被重置删掉。
所以希望增加自定义【配置文件】路径的配置项。
ssh进去直接打的命令“hlink /volume2/movie/Malignant.2021.1080p /volume2/docker/emby/share”
[HLINK` ERROR]: Error: Command failed with exit code 1 (EPERM): ln /volume2/movie/Malignant.2021.1080p/Malignant.2021.1080p.HMAX.WEB-DL.DD5.1.x264-CMRG-clearlogo.png /volume2/docker/emby/share/Malignant.2021.1080p.HMAX.WEB-DL.DD5.1.x264-CMRG-clearlogo
at makeError (/usr/local/lib/node_modules/hlink/node_modules/execa/lib/error.js:59:11)
at Function.module.exports.sync (/usr/local/lib/node_modules/hlink/node_modules/execa/index.js:187:17)
at /usr/local/lib/node_modules/hlink/lib/index.js:141:61
at step (/usr/local/lib/node_modules/hlink/lib/index.js:52:23)
at Object.next (/usr/local/lib/node_modules/hlink/lib/index.js:33:53)
at /usr/local/lib/node_modules/hlink/lib/index.js:27:71
at new Promise (<anonymous>)
at __awaiter (/usr/local/lib/node_modules/hlink/lib/index.js:23:12)
at /usr/local/lib/node_modules/hlink/lib/index.js:80:65
at Array.forEach (<anonymous>) {
command: 'ln /volume2/movie/Malignant.2021.1080p/Malignant.2021.1080p.HMAX.WEB-DL.DD5.1.x264-CMRG-clearlogo.png /volume2/docker/emby/share/Malignant.2021.1080p.HMAX.WEB-DL.DD5.1.x264-CMRG-clearlogo',
exitCode: 1,
exitCodeName: 'EPERM',
stdout: '',
stderr: 'ln: failed to create hard link ‘/volume2/docker/emby/share/Malignant.2021.1080p.HMAX.WEB-DL.DD5.1.x264-CMRG-clearlogo/Malignant.2021.1080p.HMAX.WEB-DL.DD5.1.x264-CMRG-clearlogo.png’ => ‘/volume2/movie/Malignant.2021.1080p/Malignant.2021.1080p.HMAX.WEB-DL.DD5.1.x264-CMRG-clearlogo.png’: Invalid cross-device link',
failed: true,
timedOut: false,
isCanceled: false,
killed: false,
signal: undefined
目前程序支持的后缀名过滤白名单功能满足99%需求。
但是某些特殊资源后缀名不常见,如果没有写在规则里,很可能链接不到。
比如很多原盘、图书,含有很多奇奇怪怪的类型文件。
如果能加入黑名单功能,我们就可以只排除.nfo、.jpg、.png等影响刮削的文件类型,而对其他所有文件都进行链接。
满足不同需求,更加完美。
Error: Command failed with exit code 1 (EPERM): find /media/4t/qb/hlink -inum 3813379
at makeError (/usr/local/node/node_global/lib/node_modules/hlink/node_modules/execa/lib/error.js:59:11)
at Function.module.exports.sync (/usr/local/node/node_global/lib/node_modules/hlink/node_modules/execa/index.js:187:17)
at getLinkPath (/usr/local/node/node_global/lib/node_modules/hlink/lib/utils/index.js:72:31)
at Object.checkLinkExist (/usr/local/node/node_global/lib/node_modules/hlink/lib/utils/index.js:79:17)
at /usr/local/node/node_global/lib/node_modules/hlink/lib/index.js:115:53
at step (/usr/local/node/node_global/lib/node_modules/hlink/lib/index.js:33:23)
at Object.next (/usr/local/node/node_global/lib/node_modules/hlink/lib/index.js:14:53)
at /usr/local/node/node_global/lib/node_modules/hlink/lib/index.js:8:71
at new Promise ()
at __awaiter (/usr/local/node/node_global/lib/node_modules/hlink/lib/index.js:4:12) {
command: 'find /media/4t/qb/hlink -inum 3813379',
exitCode: 1,
exitCodeName: 'EPERM',
stdout: '',
stderr: 'find: unrecognized: -inum\n' +
'BusyBox v1.29.2 (2019-03-10 14:44:18 CST) multi-call binary.\n' +
'\n' +
'Usage: find [-HL] [PATH]... [OPTIONS] [ACTIONS]\n' +
'\n' +
'Search for files and perform actions on them.\n' +
'First failed action stops processing of current file.\n' +
"Defaults: PATH is current directory, action is '-print'\n" +
'\n' +
'\t-L,-follow\tFollow symlinks\n' +
'\t-H\t\t...on command line only\n' +
"\t-xdev\t\tDon't descend directories on other filesystems\n" +
'\t-maxdepth N\tDescend at most N levels. -maxdepth 0 applies\n' +
'\t\t\tactions to command line arguments only\n' +
"\t-mindepth N\tDon't act on first N levels\n" +
'\t-depth\t\tAct on directory after traversing it\n' +
'\n' +
'Actions:\n' +
'\t( ACTIONS )\tGroup actions for -o / -a\n' +
"\t! ACT\t\tInvert ACT's success/failure\n" +
'\tACT1 [-a] ACT2\tIf ACT1 fails, stop, else do ACT2\n' +
'\tACT1 -o ACT2\tIf ACT1 succeeds, stop, else do ACT2\n' +
'\t\t\tNote: -a has higher priority than -o\n' +
'\t-name PATTERN\tMatch file name (w/o directory name) to PATTERN\n' +
'\t-iname PATTERN\tCase insensitive -name\n' +
'\t-path PATTERN\tMatch path to PATTERN\n' +
'\t-ipath PATTERN\tCase insensitive -path\n' +
'\t-regex PATTERN\tMatch path to regex PATTERN\n' +
'\t-type X\t\tFile type is X (one of: f,d,l,b,c,s,p)\n' +
'\t-perm MASK\tAt least one mask bit (+MASK), all bits (-MASK),\n' +
"\t\t\tor exactly MASK bits are set in file's mode\n" +
'\t-mtime DAYS\tmtime is greater than (+N), less than (-N),\n' +
'\t\t\tor exactly N days in the past\n' +
'\t-mmin MINS\tmtime is greater than (+N), less than (-N),\n' +
'\t\t\tor exactly N minutes in the past\n' +
"\t-newer FILE\tmtime is more recent than FILE's\n" +
'\t-user NAME/ID\tFile is owned by given user\n' +
'\t-group NAME/ID\tFile is owned by given group\n' +
'\t-size N[bck]\tFile size is N (c:bytes,k:kbytes,b:512 bytes(def.))\n' +
'\t\t\t+/-N: file size is bigger/smaller than N\n' +
"\t-prune\t\tIf current file is directory, don't descend into it\n" +
'If none of the following actions is specified, -print is assumed\n' +
'\t-print\t\tPrint file name\n' +
'\t-print0\t\tPrint file name, NUL terminated\n' +
'\t-exec CMD ARG ;\tRun CMD with all instances of {} replaced by\n' +
'\t\t\tfile name. Fails if CMD exits with nonzero\n' +
'\t-exec CMD ARG + Run CMD with {} replaced by list of file names',
failed: true,
timedOut: false,
isCanceled: false,
killed: false,
signal: undefined
Arm v8 node v14.18.1 npm 6.14.15
win11,用cmd和putty还有git bash都一样,群晖装的node v14,v12也试了,同样。
用的命令是hlink -i=mkv,mp4 "/volume1/download/movie" "/volume1/media/movie"
生成了设置文件,删除了白名单内的内容,hlink设置的是6层目录,关闭了缓存。当然,默认的设置开始就试了,更改后没有变化。
另外,无论如何,已捐赠,谢谢作者。
[HLINK ERROR]: Error: Command failed with exit code 1 (EPERM): ln /volume1/download/movie/黑衣人合集/黑衣人·全球追缉.Men.In.Black·International.2019.BluRay.1080p.x265.10bit.2Audio.MNHD-FRDS/Men.In.Black·International.2019.BluRay.1080p.x265.10bit.2Audio.MNHD-FRDS.mkv /volume1/media/movie/黑 衣人合集/黑衣人·全球追缉.Men.In.Black·International.2019.BluRay.1080p.x265.10bit.2Audio.MNHD-FRDS
at makeError (/usr/local/lib/node_modules/hlink/node_modules/execa/lib/error.js:59:11)
at Function.module.exports.sync (/usr/local/lib/node_modules/hlink/node_modules/execa/index.js:187:17)
at /usr/local/lib/node_modules/hlink/lib/index.js:141:61
at step (/usr/local/lib/node_modules/hlink/lib/index.js:52:23)
at Object.next (/usr/local/lib/node_modules/hlink/lib/index.js:33:53)
at /usr/local/lib/node_modules/hlink/lib/index.js:27:71
at new Promise ()
at __awaiter (/usr/local/lib/node_modules/hlink/lib/index.js:23:12)
at /usr/local/lib/node_modules/hlink/lib/index.js:80:65
at Array.forEach () {
command: 'ln /volume1/download/movie/黑衣人合集/黑衣人·全球追缉.Men.In.Black·International.2019.BluRay.1080p.x265.10bit.2Audio.MNHD-FRDS/Men.In.Black·International.2019.BluRay.1080p.x265.10bit.2Audio.MNHD-FRDS.mkv /volume1/media/movie/黑衣人合集/黑衣人·全球追缉.Men.In.Black·International.2019.BluRay.1080p.x265.10bit.2Audio.MNHD-FRDS',
exitCode: 1,
exitCodeName: 'EPERM',
stdout: '',
stderr: "ln: failed to create hard link '/volume1/media/movie/黑衣人合集/黑衣人·全球追缉.Men.In.Black·International.2019.BluRay.1080p.x265.10bit.2Audio.MNHD-FRDS/Men.In.Black·International.2019.BluRay.1080p.x265.10bit.2Audio.MNHD-FRDS.mkv' => '/volume1/download/movie/黑衣人合集/黑衣人·全球追缉.Men.In.Black·International.2019.BluRay.1080p.x265.10bit.2Audio.MNHD-FRDS/Men.In.Black·International.2019.BluRay.1080p.x265.10bit.2Audio.MNHD-FRDS.mkv': Invalid cross-device link",
failed: true,
timedOut: false,
isCanceled: false,
killed: false,
signal: undefined
}
[HLINK INFO]: 硬链创建完毕... 总数 179 条
[HLINK INFO]: 成功 0 条
[HLINK INFO]: 失败 148 条
[HLINK INFO]: 跳过 31 条
[HLINK INFO]: 跳过之前的创建记录 0 条, 如果需要重新创建,请在删除或编辑文件 /root/.hlink/cache.json
原盘(非ISO)文件,硬链接后用蓝光机播放不了,没链接的可以播,对发现是硬链接的文件不全(没在后缀名列表里)
打个比方:我源路径下删除了一个文件夹,在执行一次某条命令可以放硬连接的目录也删除这个文件夹?
看完issue #39 感觉没太整明白
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.