快捷操作

基于路径匹配文件属性筛选出的路径列表,可执行各类快捷操作。

  • 只读操作 > 对源路径数据进行只读操作,不修改或删除。
    • list: 列出匹配的路径。
    • search: 搜索文本文件内容。
    • fdups: 查找重复文件。
    • archive: 文件归档。
    • unarchive: 文件解归档。
    • mirror: 增量同步。
  • 读写操作 > 对源路径数据进行修改或删除操作(写操作立即生效)。
    • replace: 文本查找与替换。
    • rmdir: 删除空目录。
    • clean: 清理文件。
    • wipe: 安全擦除文件。

注:所有快捷操作均通过下图B3按钮选择及执行。

T0GUI-快捷操作

shortcut-desc

A. 路径匹配 - 多个路径

拖放一个或多个目录/文件至A区,作为待处理路径。

  • A1. 从系统剪贴板粘贴路径;
  • A2. 打开路径选择器,选择一个或多个文件;
  • A3. 打开路径选择器,选择一个目录;
  • A4. 清空拖放区内容;

B. 选择操作 - 一键执行

  • B1. 文件属性筛选条件;
  • B2. 选择是否立即执行。若不立即执行,则仅输出相应命令;
  • B3. 选择操作类型,并一键执行;

C. 命令就绪

命令来源:选择操作后生成的命令,或通过配置加载的批处理命令。

  • C1. 待执行的命令列表
  • C2. 命令执行进度
  • C3. 批量执行命令

D. 输出结果

T1GUI-list

功能与新手教程-路径匹配-单路径中描述一致,此处支持多路径匹配。

功能与新手教程-文本搜索-执行结果中描述一致,此处支持在多路径内进行文本搜索。

T3GUI-fdups

通过哈希值(HashValue)判断文件内容是否重复。

shortcut-fdups

输出数据(含参数设置):

ft fdups --pattern="**"  --source=~/Downloads/ft --fields=ok,action,type,modified,size,extra -v  
ft fdups --pattern="**"  --source=~/Downloads/xft --fields=ok,action,type,modified,size,extra -v
Ok Action Type Size Modified Path Extra
1 fdups f 1.2K May 03 14:52 ~/Downloads/ft/README copy.md hash:8770095025493393364
1 fdups f 1.2K Aug 12 14:57 ~/Downloads/ft/README.md hash:8770095025493393364
1 fdups f 373B Aug 12 14:55 ~/Downloads/xft/pubspec copy.yaml hash:4918059497035380282
1 fdups f 373B Aug 10 15:20 ~/Downloads/xft/pubspec.yaml hash:4918059497035380282

T4GUI-archive

将一个或多个路径归档至指定目标文件。 归档类型和目标路径可在设置->目标->归档中调整。

shortcut-archive

输出数据(含参数设置):

ft archive --pattern="**" --excludes="/**/.**" --source=~/Downloads/ft --fields=ok,action,type --target=~/Documents/FileShows/archive/ft.tgz --type=tgz -v
Ok Action Type Path
1 archive f ~/Downloads/ft/test/ft_test.dart
1 archive f ~/Downloads/ft/bin/ft.dart
1 archive f ~/Downloads/ft/CHANGELOG.md
1 archive f ~/Downloads/ft/example/ft_example_action.dart
1 archive f ~/Downloads/ft/example/ft_example.dart
1 archive f ~/Downloads/ft/pubspec.lock
1 archive f ~/Downloads/ft/README.md
1 archive f ~/Downloads/ft/pubspec.yaml
1 archive f ~/Downloads/ft/lib/ft.dart

T5GUI-unarchive

将一个或多个归档文件解压至指定目标目录。 解压目标目录可在设置->目标->解归档中调整。

shortcut-unarchive

输出数据(含参数设置):
注意:解压时,--pattern--excludes 参数将被忽略。

ft unarchive --source=~/Downloads/ft.tgz --fields=ok,action,type --target=~/Documents/FileShows/unarchive/ft.tgz  -v
Ok Action Type Path
1 unArchive f ~/Documents/FileShows/unarchive/ft.tgz/bin/ft.dart
1 unArchive f ~/Documents/FileShows/unarchive/ft.tgz/CHANGELOG.md
1 unArchive f ~/Documents/FileShows/unarchive/ft.tgz/example/ft_example.dart
1 unArchive f ~/Documents/FileShows/unarchive/ft.tgz/README.md
1 unArchive f ~/Documents/FileShows/unarchive/ft.tgz/pubspec.yaml
1 unArchive f ~/Documents/FileShows/unarchive/ft.tgz/.gitignore
1 unArchive f ~/Documents/FileShows/unarchive/ft.tgz/lib/ft.dart

T6GUI-mirror

将一个或多个源路径,增量同步至目标目录。 目标目录可在设置->目标->同步中调整。

shortcut-mirror

输出数据(含参数设置):

ft mirror --pattern="**" --excludes="/**/.**" --source=~/Downloads/ft --fields=ok,action,type --target=~/Documents/FileShows/mirror/ft  -v
Ok Action Type Path
1 mirror f ~/Documents/FileShows/mirror/ft/bin/ft.dart
1 mirror f ~/Documents/FileShows/mirror/ft/CHANGELOG.md
1 mirror f ~/Documents/FileShows/mirror/ft/example/ft_example.dart
1 mirror f ~/Documents/FileShows/mirror/ft/README.md
1 mirror f ~/Documents/FileShows/mirror/ft/pubspec.yaml
1 mirror f ~/Documents/FileShows/mirror/ft/lib/ft.dart

T7GUI-replace

文本替换是文本搜索的附加功能。

shortcut-replace

输出数据(含参数设置):

ft search --pattern="**.yaml" --excludes="/**/.**" --source=~/Downloads/ft --fields=ok,action,type --regexp="version: 1.0.\d+" --replace="version: 1.0.1" -v
Level LineNo ReplaceTo Path
i L:3 version: 1.0.1 F:~/Downloads/ft/pubspec.yaml

T8GUI-rmdir

递归删除空目录(即目录下无任何文件或子目录的目录)。

shortcut-rmdir 若目录非空,可先使用clean命令清理内容,再执行删除操作。

输出数据(含参数设置):

ft rmdir --pattern="**" --source=~/Downloads/2.0.1 --fields=ok,action,type -v
Ok Action Type Path
1 rmdir d ~/Downloads/2.0.1/example/android/app/src/debug
1 rmdir d ~/Downloads/2.0.1/example/android/app/src/main
1 rmdir d ~/Downloads/2.0.1/example/android/app/src
1 rmdir d ~/Downloads/2.0.1/example/android/gradle
1 rmdir d ~/Downloads/2.0.1/example/android/app
1 rmdir d ~/Downloads/2.0.1/example/android
1 rmdir d ~/Downloads/2.0.1/example
1 rmdir d ~/Downloads/2.0.1

T9GUI-wipe

递归清理文件。

shortcut-clean

常用清理模式:

  • **.DS_Store macOS 桌面服务存储文件。
  • **.sw[p|o|n] Emacs/Vi 交换文件。
  • **.un Vim 撤销文件。
  • **~ Emacs/Nano 备份文件。
  • **# Emacs 自动保存文件。

输出数据(含参数设置):

ft wipe --pattern="**"  --source=~/Downloads/textfile-3 --fields=ok,action,type -v
ft wipe --pattern="**"  --source=~/Downloads/mdocs1 --fields=ok,action,type -v
Ok Action Type Path
1 clean f ~/Downloads/textfile-3
1 clean f ~/Downloads/mdocs1/readme 2.md
1 clean f ~/Downloads/mdocs1/readme 3.md
1 clean f ~/Downloads/mdocs1/readme 1.md

T10GUI-wipe

多重安全擦除文件。

shortcut-wipe 使用随机内容多次覆写文件,以确保数据无法恢复。 由于涉及大量写入操作,对存储设备性能有较高要求。非必要情况下,请避免对整个目录进行递归安全擦除。

输出数据(含参数设置):

ft wipe --pattern="**"  --source=~/Downloads/2412229998-report.pdf --fields=ok,action,type -v
ft wipe --pattern="**"  --source=~/Downloads/q.sql --fields=ok,action,type -v
ft wipe --pattern="**"  --source=~/Downloads/order.xlsx --fields=ok,action,type -v
Ok Action Type Path
1 wipe f ~/Downloads/2412229998-report.pdf
1 wipe f ~/Downloads/q.sql
1 wipe f ~/Downloads/order.xlsx