Skip to content

SpaceKnife 0.3.5

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 10 Nov 16:36
· 16 commits to main since this release
v0.3.5
29f2fc7

English · 简体中文 · Website · Documentation

SpaceKnife 0.3.5 (pre-release)

A disk usage analyzer that shows what fills your drives, on Windows, Linux and macOS. SpaceKnife is an independent project inspired by SpaceSniffer and is not affiliated with SpaceSniffer or its author.

This is a pre-release. Windows and Linux builds are not code-signed; the macOS builds are ad-hoc signed, not notarized.

This version is rewritten underneath. The backend is Rust instead of Python, and the interface is Vue. Where it can, the window is Tauri 2 with the web view the system already has, which makes the downloads much smaller; only the rpm (RHEL 9 has no WebKitGTK 4.1), the AppImage and the Linux portable under 0.3.4's file name keep a slimmed Electron shell. The features and the interface are those of 0.3.4, your data stays, and every kind of 0.3.4 install updates to this one. Special thanks to @Ry3nZhao, who made a major contribution to this Rust-only version: the Rust backend and the Tauri app this rewrite is built on come from his work (#22).

Every file was built and checked by GitHub Actions: run 42848036672.

Download

System File Size
Windows 10+ x64 SpaceKnife-0.3.5-Setup-x64.exe 25 MB
Windows 10+ x64, portable SpaceKnife-0.3.5-win-x64-portable.zip 36 MB
Windows 11 on ARM, portable SpaceKnife-0.3.5-win-arm64-portable.zip 34 MB
macOS 14+, Apple Silicon SpaceKnife-0.3.5-mac-arm64.dmg 34 MB
macOS 14+, Intel SpaceKnife-0.3.5-mac-x64.dmg 37 MB
macOS 14+, Apple Silicon, portable SpaceKnife-0.3.5-mac-arm64-portable.zip 34 MB
macOS 14+, Intel, portable SpaceKnife-0.3.5-mac-x64-portable.zip 37 MB
Ubuntu 22.04+ / Debian family spaceknife_0.3.5_amd64.deb 30 MB
RHEL 9+ / Fedora family spaceknife-0.3.5.x86_64.rpm 94 MB
Other Linux x64 SpaceKnife-0.3.5-x86_64.AppImage 130 MB
Linux x64 with WebKitGTK 4.1, portable, small (new) SpaceKnife-0.3.5-linux-x64-tauri.tar.gz 38 MB
Linux arm64 with WebKitGTK 4.1, portable, small (new) SpaceKnife-0.3.5-linux-arm64-tauri.tar.gz 37 MB
Any Linux x64, portable (also RHEL 9) SpaceKnife-0.3.5-linux-x64-portable.tar.gz 136 MB
Any Linux arm64, portable (also RHEL 9) SpaceKnife-0.3.5-linux-arm64-portable.tar.gz 136 MB
  • From 0.3.4: click the badge at the top right. The release files keep 0.3.4's names, so the card finds the file for your installation, checks its SHA-256 and offers Seamless update (Windows installer, portable copies, AppImage) or the classic way (dmg, deb, rpm). Settings, file classes, tags and snapshots stay, and the snapshots 0.3.x saved still open. What each kind of install does: Upgrading from 0.3.4. If 0.3.4 is set to Releases only (Settings › About & updates › Versions to offer), it doesn't offer 0.3.5, since every 0.x release is a pre-release on GitHub: switch to Include previews for this update, or download the file from the table above.
  • Windows: the installer installs for the current user (%LOCALAPPDATA%\Programs\SpaceKnife) or all users (C:\Program Files\SpaceKnife). Over 0.3.4 it keeps 0.3.4's folder, uninstall entry and shortcuts, and replaces 0.3.4 instead of installing a second copy. It installs the Microsoft Edge WebView2 Runtime where it is missing (some Windows 10 computers; that needs an internet connection), and has one older than 89.0.774.44 (too old to open the window) updated; if it can't, nothing is changed. A folder you choose without "SpaceKnife" in its path gets \SpaceKnife added, as with 0.3.4; a silent install's /D= is used as given, for either scope. Updates and the uninstaller remove only the files the installer put there (by the list it keeps next to them, installed-files.txt), and folders only once they are empty: a file of yours in the folder stays. It is unsigned: SmartScreen › "More info › Run anyway".
  • macOS: drag into Applications to replace the old SpaceKnife; on first launch, System Settings › Privacy & Security › "Open Anyway" (steps). Switch Full Disk Access off and on again, as after every update.
  • Linux: the deb now puts spaceknife and spaceknife-cli in /usr/bin and the rest in /usr/lib/SpaceKnife instead of /opt/SpaceKnife, and needs WebKitGTK 4.1 (apt installs it). It is still the package spaceknife with the same menu entry, so it upgrades 0.3.4's. The rpm stays in /opt/SpaceKnife, linked from /usr/bin/spaceknife and now also /usr/bin/spaceknife-cli. The AppImage needs FUSE 2 (libfuse2) or --appimage-extract-and-run; AppImageUpdate updates it in place (the .zsync file is attached).
  • Portable: unpack anywhere; everything is kept in data next to the app (on macOS except the web view's own data, see the known limitations). The Windows portables need the WebView2 Runtime, 89.0.774.44 or later (Windows 11 has it); when it is missing or too old, SpaceKnife says so in a window before it quits, with a button to Microsoft's download page (your data is untouched, and SpaceKnife --headless works meanwhile). For Linux there are two: the small one uses the system's WebKitGTK 4.1 (Ubuntu 22.04+, Debian 12, Fedora); …-linux-<arch>-portable.tar.gz brings its own engine, runs on RHEL 9 too, and is the one a 0.3.4 portable copy updates to. To switch to the small one, copy the old copy's data folder into it. Before Seamless update replaces anything, it checks that 0.3.5 can start on this computer; when it can't, nothing is replaced and 0.3.4 shows why for a moment (on Windows a window also says what is missing and where to get it). Once the files are in place, it starts the new version and waits up to 90 seconds for it to come up; if the new version quits with an error before that, or isn't up in time (then it is closed), the update is undone and the old version opens again, provided its files are still as they were moved aside. Either way, Seamless update can simply be clicked again later.
  • Checksums: SHA256SUMS.txt (installers), SHA256SUMS-portable-<target>.txt (Windows portables and the Linux portables under 0.3.4's name), SHA256SUMS-tauri-linux-<arch>.txt (the small Linux portables), SHA256SUMS-mac-<arch>.txt (dmg and portable, one file per chip).

What's new

  • Rewritten underneath, the same to use. The features and the interface are those of 0.3.4. The backend is rewritten in Rust: scanning, the store, filters, layouts, live monitoring, export and file operations; there is no frozen Python backend any more. The interface is rewritten with Vue. Before it went in, the new backend was checked against 0.3.4's over the same protocol, scenario by scenario.
  • Much smaller downloads. The Windows installer, the Windows and macOS portables, the macOS app, the deb and the new small Linux portable run the interface in Tauri 2, with the web view the system already has (Microsoft Edge WebView2 on Windows, WebKit on macOS, WebKitGTK 4.1 on Linux) instead of a Chromium of their own, and the backend runs inside the app instead of as a second program. Only where that can't run, the rpm (RHEL 9 has no WebKitGTK 4.1), the AppImage and the Linux portable under 0.3.4's file name keep a slimmed Electron shell around the same interface, which starts spaceknife-cli serve next to it as 0.3.4 started its backend. Settings › About & updates › Components shows which one a copy uses. On Windows, when the WebView2 Runtime is missing or older than 89.0.774.44, SpaceKnife says so in a window before it quits, with a button to Microsoft's download page (your data is untouched, and SpaceKnife --headless works meanwhile).
  • Scans pace themselves folder by folder. A hard scan now tells the folders that wait for the disk from those already in the file cache, by how long each listing waits, and lists each kind with its own number of folders at once, which it finds while it scans, from the first scan of a drive on; subfolders start from their parent's guess, so a tree that is partly in the cache is handled part by part. The drive's type sets where it starts (a hard disk stays at a fixed depth), and the disk-load limit still caps the total. On the drives measured, scans were as fast as before or faster, most of all from the cache.
  • The delete basket is much faster and reads far less from the disk. On Windows, moving to the Recycle Bin no longer hands every item to the shell, which walks each folder and the whole bin: when the bin is your own folder and the item fits, SpaceKnife writes the bin's record and renames the item into it, as the shell does (otherwise the shell still does it, and moving to the Recycle Bin still never becomes a permanent deletion). The bin's size is added up from those records instead of walking it, and adding to the basket checks only the new items for programs that hold them. Delete permanently works on several items and folders at once, as many as the drive suits (8 on NVMe, 4 on other SSDs and network locations, 2 on hard disks, USB sticks and SD cards), always a folder's contents before the folder, with every check as before; on exFAT and FAT drives each item takes one disk write fewer. On Linux the trash is looked up once per drive, and the size of a folder moved into it is remembered (directorysizes).
  • The Windows installer installs where 0.3.4 was. SpaceKnife-<version>-Setup-x64.exe uses 0.3.4's uninstall entry, folders (%LOCALAPPDATA%\Programs\SpaceKnife for the current user, C:\Program Files\SpaceKnife for all users), shortcuts and Your data page. Over 0.3.4 (by Seamless update or by hand) it removes 0.3.4 with 0.3.4's own uninstaller, keeping your data, and installs 0.3.5 into the same folder for the same users: one SpaceKnife in the app list, the same Start menu and desktop shortcuts. An install of 0.3.4 whose registry entries are gone is still found by its files. Where the Microsoft Edge WebView2 Runtime is missing (some Windows 10 computers), it installs that first, which needs an internet connection, and one older than 89.0.774.44 (too old to open the window) it has updated; if it can't, nothing is changed. When Seamless update can't install 0.3.5, 0.3.4 opens again and a message says why and where the installer's log is (%TEMP%\SpaceKnife-install.log). A folder you choose without "SpaceKnife" in its path gets \SpaceKnife added, as with 0.3.4 (D:\Tools becomes D:\Tools\SpaceKnife); a silent install's /D= is used as given, for either scope. Updates and the uninstaller remove only the files the installer put there, by the list it keeps next to them (installed-files.txt), and folders only once they are empty: a file of yours in the folder stays.
  • A small portable for Linux, x64 and arm64: SpaceKnife-<version>-linux-<arch>-tauri.tar.gz. It uses the system's WebKitGTK 4.1 (Ubuntu 22.04 and later, Debian 12, Fedora). The Linux portable under 0.3.4's name, SpaceKnife-<version>-linux-<arch>-portable.tar.gz, brings its own engine and runs on RHEL 9 too; a 0.3.4 portable copy updates to that one. To move to the small one, unpack it and copy the old copy's data folder into it.
  • The command-line program is spaceknife-cli (in 0.3.x it was the backend program resources/backend/spaceknife-backend), installed next to the app, and in /usr/bin by the deb and the rpm: scan, run, snapshot list / show, serve, headless, version. scan prints what 0.3.4 printed, so scripts only need the new path.
  • Headless mode is spaceknife-cli headless [--listen <address>] [--yes] [--tls-cert FILE --tls-key FILE] [--ui DIR]; the pages and the WebSocket share one address, and it needs no display or desktop libraries, so a portable tar.gz is enough on a server. 0.3.x's ways of starting it still work, so service units and scripts keep running: --headless and --listen <address> anywhere among the arguments, SpaceKnife --headless … in a terminal on Windows (SpaceKnife.com next to the app starts spaceknife-cli and waits for it; without these options it opens the window and waits for it to close, as in 0.3.x), spaceknife --headless … on Linux, the AppImage with --headless, and SpaceKnife.app/Contents/MacOS/SpaceKnife --headless … on macOS. In a portable copy headless mode keeps its data in the data folder, as in 0.3.x. The warning before it opens to the network now says all that the link allows: also writing files anywhere your account can write, and asking for administrator rights on that computer.
  • Every kind of 0.3.4 install updates to 0.3.5. The release files keep 0.3.4's names (SpaceKnife-<version>-Setup-x64.exe, SpaceKnife-<version>-x86_64.AppImage with its .zsync, spaceknife_<version>_amd64.deb, spaceknife-<version>.x86_64.rpm, SpaceKnife-<version>-mac-<arch>.dmg and the portable archives), so 0.3.4's update check finds 0.3.5 (unless it is set to Releases only: every 0.x release is a pre-release on GitHub) and installs it as it installs any update. A portable copy's Seamless update works from 0.3.4 too: the program keeps its name (SpaceKnife.exe, spaceknife, SpaceKnife.app) and every portable archive carries the swap helper 0.3.x runs. Before it replaces anything, the helper checks that the new version starts on this computer (the WebView2 Runtime 89.0.774.44 or later on Windows, WebKitGTK 4.1 for the small Linux portable); when it doesn't, nothing is replaced, SpaceKnife says why (0.3.4 only for a moment; on Windows a window also says what is missing and where to get it) and the copy goes on as it was. Once the files are in place, the helper starts the new version and waits up to 90 seconds for it to come up; if the new version quits with an error before that, or isn't up in time (then it is closed), the update is undone and the old version opens again, provided its files are still as they were moved aside. Either way, Seamless update can simply be clicked again later. The Windows programs have the C runtime built in, so none of them needs the Visual C++ Redistributable.
  • Updates: with Releases only (Settings › About & updates › Versions to offer) SpaceKnife now offers the 0.x releases whose version has no pre-release part; every 0.x release is marked pre-release on GitHub, so 0.3.4 offered none there. On Windows the update check also follows the system's automatic proxy detection and setup script, not only a fixed proxy server. From now on, when Seamless update of a portable copy has to be undone, the old version says so when it opens again, with the reason and the log (The update didn't complete: …). The AppImage's Seamless update first checks that the new version starts on this computer and keeps the old file as <name>.previous until the next update. Open the package copies the deb to your Downloads folder first, where the App Center of Ubuntu 23.10 and later can read it.
  • Package layout: the deb puts spaceknife and spaceknife-cli in /usr/bin and the rest in /usr/lib/SpaceKnife instead of /opt/SpaceKnife, and depends on WebKitGTK 4.1; it is still the package spaceknife with the same menu entry, so it upgrades 0.3.4's. The rpm keeps 0.3.4's /opt/SpaceKnife, linked from /usr/bin, and adds /usr/bin/spaceknife-cli.
  • Settings and data stay where they were: settings, file classes, classified folders, remembered tags, the palette's recent entries, the update state and logs are read from the same folders (Windows %LOCALAPPDATA%\SpaceKnife, macOS ~/Library/Application Support/SpaceKnife, Linux ~/.config/SpaceKnife and ~/.local/share/SpaceKnife); on macOS XDG_DATA_HOME / XDG_CONFIG_HOME / XDG_CACHE_HOME are followed as 0.3.x followed them. The old logs 0.3.x rotated (logs/spaceknife.<time>.log) are deleted on the first start. A classes.json or class_folders.json that cannot be read is never written over: the next save renames it and leaves it beside the new one (classes.unreadable-<time>.json). The Tauri builds keep the window's own files (theme, web view data) apart from the backend's (%LOCALAPPDATA%\io.github.duskxi.spaceknife and the like) and take the theme 0.3.4 had at their first start; the Electron builds keep them where 0.3.4 had them.
  • Snapshots of 0.3.x still open. Snapshots saved by 0.3.x (format 2) open and compare as they are, with no conversion, and show under Recent and in the comparison lists; 0.3.5 saves format 3. The auto-save retention (the newest 10, then one a week) counts 0.3.x's snapshots too; a snapshot file that cannot be read (damaged, or of a newer format) is never deleted.

Fixes

Security and safe deletes

  • Open in Terminal could run part of a folder's name (Windows): for a folder whose name holds &, ^, % or brackets (x&calc), 0.3.4 passed the name through the command processor, which ran the rest as a command. The terminal is now started directly, never through a shell.
  • Delete permanently stays inside what you chose: deleting a folder no longer builds its items' paths from their names, so a name the file system lists with a \ or .. in it (Linux files on a WinBtrfs drive) can't lead outside the folder; a folder swapped for a link while it is being deleted isn't followed; on Linux a bind mount inside the folder is no longer entered (0.3.4 deleted the files of its source there), and a bind mount is protected like any mount point.
  • The delete basket deletes only what you confirmed: items that another window or a headless browser added while the confirmation was open are left alone, and two deletions can no longer start at once.
  • Open, Show in Explorer and Open terminal here no longer pass on a name the system would read as another item (Windows drops a trailing dot or space: Open on setup. started setup next to it), nor a name that isn't valid Unicode; for such items the commands are greyed out and say why. Such names show as they did in 0.3.4: escaped (\xff on Linux and macOS, \udc80 on Windows) in lists, paths, the delete basket and the command palette, which finds them written so, and as ? in the labels drawn on the views.
  • An update is downloaded only when the release lists its SHA-256: 0.3.4 downloaded a file without a published checksum and marked it unverified; now nothing is downloaded and the card says why.
  • Seamless update of a portable copy no longer takes your files with it: 0.3.4 moved everything in the copy's folder except data aside, and the new version deleted it when it started, so a file or another program kept next to SpaceKnife.exe (in a tools folder, on the Desktop) was lost. Now only SpaceKnife's own files are moved and the system's (desktop.ini, .DS_Store …) stay; when the folder holds anything else, nothing is updated and SpaceKnife names up to three of those items: keep SpaceKnife and its data in a folder of their own, or use Replace it yourself. The update from 0.3.4 is protected too, since the new version's helper does the work.

Other fixes

  • Open in Terminal on Linux without x-terminal-emulator (RHEL 9, Fedora) opened nothing; now it starts the first installed of GNOME Terminal, Ptyxis, Console, Konsole, Xfce Terminal, MATE Terminal, Tilix and xterm.
  • Removing the rpm leaves nothing in /opt: 0.3.4's rpm owned none of its folders, so dnf remove left an empty /opt/SpaceKnife behind. The rpm now owns them, and the update from 0.3.4 also removes the empty folders 0.3.4's backend left in /opt/SpaceKnife/resources/backend.
  • Undo after moving to the Recycle Bin on exFAT and FAT drives (Windows): those drives have one Recycle Bin shared by all users, without a folder per user, and 0.3.4 answered Undo with "Not a trash entry that can be restored". Now Undo puts the items back.
  • The delete basket says why it couldn't delete or recycle an item: instead of the system's own words (often as vague as "The parameter is incorrect"), it names the cause in the interface's language: in use, no permission, read-only medium (write-protected or mounted read-only), disk full, I/O error, device not ready, network connection lost, not supported by this file system, a name or path the file system doesn't take, file system damaged (check the disk first), or a cloud sync program such as OneDrive refusing; "Some contents couldn't be deleted" is followed by the cause. On Windows a file another program keeps open while it is being deleted is no longer reported as "Permission denied": the folder is retried for about a second, then it says the contents are deleted but a program still has a file open, and to delete it again later. On Linux a Btrfs subvolume (a snapshot, say) inside a folder is called that, with btrfs subvolume delete to remove it, not the mount point of another volume; on macOS items on another drive go to that drive's .Trashes, as the basket now says, and a drive without a Trash says it can only be deleted permanently.
  • Command-line output to NUL: scan with its output sent to NUL (> NUL in the command prompt, >/dev/null in Git Bash) ended with an error and without its snapshot; now it finishes and saves the snapshot.
  • Singular English counts on the command line: a scan with one unreadable folder says "1 folder couldn't be accessed", snapshot list says "1 snapshot in …" and snapshot show "· 1 item ·". Thanks to @swastiktawate (#9).

Known limitations

  • Nothing is code-signed or notarized yet (the macOS builds are ad-hoc signed).
  • Snapshots saved by 0.3.5 (format 3) don't open in 0.3.x: going back to 0.3.x, you see only the snapshots it saved itself.
  • No seamless update yet for the macOS dmg, deb and rpm: the card opens the disk image or package.
  • From 0.3.4 on Ubuntu 23.10 and later, Open the package may not open the deb: 0.3.4 opens it from its hidden updates folder (~/.local/share/SpaceKnife/updates), which App Center (a snap) can't read. Download the deb from this page and open it, or run sudo apt install ./spaceknife_0.3.5_amd64.deb. 0.3.5 copies the package to Downloads before opening it.
  • The ARM portables were built and tested on GitHub's ARM runners only, not yet on ARM hardware; the installers are x64 only.
  • Not yet tried by hand: the update from 0.3.4 on a clean Windows 10 without the WebView2 Runtime, an all-users install with its administrator prompt, and opening the deb and rpm in the software centers of Ubuntu 22.04 and RHEL 9.
  • On distributions that restrict unprivileged user namespaces (Ubuntu 23.10 and later), the AppImage and the portable …-linux-<arch>-portable.tar.gz may need --no-sandbox, as in 0.3.4; the deb and the small portable don't.
  • On WinBtrfs, a scan that starts at (or inside) one of two folders whose names differ only in case reaches the other one, as do Explorer and copied paths; scan the folder that holds both.
  • On macOS, the Disks page doesn't read NVMe disks' own health record in this version (lifetime reads and writes, temperature, power-on time, life left); 0.3.4 did. The reads and writes since startup still show. It is planned for the next version.
  • On macOS, the web view's own data (page storage and caches) is always kept in ~/Library/WebKit/io.github.duskxi.spaceknife, for a portable copy and with SPACEKNIFE_HOME too: WKWebView takes no other folder. Settings, snapshots, logs and the cache stay where they were (a portable copy's in its data folder).

License: MIT. Third-party licenses ship in the licenses folder that comes with the app (resources/licenses in the Electron builds): THIRD-PARTY-rust.txt and THIRD-PARTY-ui.txt.


简体中文

SpaceKnife 是看清磁盘被什么占满的硬盘占用分析工具,支持 Windows、Linux 和 macOS。它受 SpaceSniffer 启发,是独立开发的新项目,与 SpaceSniffer 及其作者没有任何关联。官网 · 文档

这是预发布版:Windows 和 Linux 版没有代码签名,macOS 版是 ad-hoc 签名,未经公证。

这一版底下整个重写了:后端从 Python 换成 Rust,界面换成 Vue。能用的地方,窗口都用 Tauri 2 和系统已有的网页视图,下载因此小得多;只有 rpm(RHEL 9 没有 WebKitGTK 4.1)、AppImage 和沿用 0.3.4 文件名的 Linux 便携版仍用精简的 Electron 外壳。功能和界面与 0.3.4 相同,数据都保留,0.3.4 的每种安装方式都能更新到这一版。特别感谢 @Ry3nZhao,他为这个纯 Rust 的版本做出了重大贡献:这次重写所依托的 Rust 后端和 Tauri 版都来自他的工作(#22)。

所有文件都由 GitHub Actions 构建并检查:run 42848036672。

下载

系统 文件 大小
Windows 10+ x64 SpaceKnife-0.3.5-Setup-x64.exe 25 MB
Windows 10+ x64 便携版 SpaceKnife-0.3.5-win-x64-portable.zip 36 MB
ARM 版 Windows 11 便携版 SpaceKnife-0.3.5-win-arm64-portable.zip 34 MB
macOS 14+,Apple Silicon SpaceKnife-0.3.5-mac-arm64.dmg 34 MB
macOS 14+,Intel SpaceKnife-0.3.5-mac-x64.dmg 37 MB
macOS 14+,Apple Silicon 便携版 SpaceKnife-0.3.5-mac-arm64-portable.zip 34 MB
macOS 14+,Intel 便携版 SpaceKnife-0.3.5-mac-x64-portable.zip 37 MB
Ubuntu 22.04+ / Debian 系 spaceknife_0.3.5_amd64.deb 30 MB
RHEL 9+ / Fedora 系 spaceknife-0.3.5.x86_64.rpm 94 MB
其他 Linux x64 SpaceKnife-0.3.5-x86_64.AppImage 130 MB
有 WebKitGTK 4.1 的 Linux x64,小巧的便携版(新) SpaceKnife-0.3.5-linux-x64-tauri.tar.gz 38 MB
有 WebKitGTK 4.1 的 Linux arm64,小巧的便携版(新) SpaceKnife-0.3.5-linux-arm64-tauri.tar.gz 37 MB
任意 Linux x64 便携版(RHEL 9 也能用) SpaceKnife-0.3.5-linux-x64-portable.tar.gz 136 MB
任意 Linux arm64 便携版(RHEL 9 也能用) SpaceKnife-0.3.5-linux-arm64-portable.tar.gz 136 MB
  • 从 0.3.4 升级:点右上角的徽章。发布文件沿用 0.3.4 的名字,卡片能找到对应安装方式的文件、核对 SHA-256,然后可选「无缝更新」(Windows 安装版、便携版、AppImage)或经典方式(dmg、deb、rpm)。设置、文件类别、标签和快照都保留,0.3.x 存的快照照样能打开。每种安装方式会怎样:从 0.3.4 升级。0.3.4 设成「只要正式版」(设置 › 关于与更新 › 提示哪些版本)时不会提示 0.3.5,因为 0.x 的每个发布在 GitHub 上都标为预发布:这次更新时改成「包括预览版」,或从上面的表里下载。
  • Windows:安装程序可装给当前用户(%LOCALAPPDATA%\Programs\SpaceKnife)或所有用户(C:\Program Files\SpaceKnife)。装在 0.3.4 上时沿用 0.3.4 的目录、卸载项和快捷方式,把 0.3.4 换成新版本,不会装出第二份。缺少 Microsoft Edge WebView2 Runtime 时(部分 Windows 10 电脑)会装上它,这需要联网;版本低于 89.0.774.44(太旧,打不开窗口)时会让它升级;做不到时什么都不改。自己选的目录路径里没有「SpaceKnife」时,和 0.3.4 一样在后面加上 \SpaceKnife;静默安装的 /D= 两种范围都认,照原样使用。更新和卸载只删安装程序装进去的文件(按它留在旁边的清单 installed-files.txt),文件夹空了才删:你放在里面的文件留着。未签名,SmartScreen 提示时点「更多信息 › 仍要运行」。
  • macOS:拖进「应用程序」,替换旧的 SpaceKnife;第一次打开到「系统设置 › 隐私与安全性」点「仍要打开」(步骤)。和每次更新后一样,把「完全磁盘访问权限」关掉再打开一次。
  • Linux:deb 现在把 spaceknife 和 spaceknife-cli 装到 /usr/bin,其余文件放在 /usr/lib/SpaceKnife,不再放在 /opt/SpaceKnife,并需要 WebKitGTK 4.1(apt 会装上)。包名仍是 spaceknife,应用菜单里的条目也相同,所以是对 0.3.4 那个包的普通升级。rpm 仍装在 /opt/SpaceKnife,/usr/bin/spaceknife 链接过去,现在还有 /usr/bin/spaceknife-cli。AppImage 需要 FUSE 2(libfuse2),或加 --appimage-extract-and-run;可用 AppImageUpdate 就地更新(附带 .zsync 文件)。
  • 便携版:解压即用,数据都在程序旁的 data 里(macOS 上网页视图自己的数据除外,见已知限制)。Windows 便携版需要 89.0.774.44 或更新的 WebView2 Runtime(Windows 11 自带);没有或太旧时,SpaceKnife 退出之前弹窗说明,按钮打开微软的下载页(data 没有任何改动,在那之前可以用 SpaceKnife --headless)。Linux 有两种:小巧的那种用系统的 WebKitGTK 4.1(Ubuntu 22.04+、Debian 12、Fedora);…-linux-<架构>-portable.tar.gz 自带引擎,RHEL 9 上也能用,0.3.4 的便携版更新到的就是它。想换成小巧的那种,把旧副本的 data 文件夹复制进去。「无缝更新」换任何东西之前先确认 0.3.5 能在这台电脑上启动;不能时什么都不换,0.3.4 会短暂提示原因(Windows 上还会弹出一个窗口,说明缺什么、去哪里下载)。换好文件后,它启动新版本,最多等 90 秒让它启动起来;新版本在那之前出错退出,或者到时还没起来(这时把它关掉),就撤回这次更新、重新打开旧版本——前提是旧版本移开的文件还和移开时一样。无论哪种情况,之后都可以直接再点「无缝更新」。
  • 校验和:SHA256SUMS.txt(安装包)、SHA256SUMS-portable-<目标>.txt(Windows 便携版和沿用 0.3.4 文件名的 Linux 便携版)、SHA256SUMS-tauri-linux-<架构>.txt(小巧的 Linux 便携版)、SHA256SUMS-mac-<架构>.txt(dmg 和便携版,每种芯片一份)。

新功能

  • 底下整个重写,用起来不变:功能和界面与 0.3.4 相同。后端用 Rust 重写:扫描、存储、过滤、布局、实时监控、导出和文件操作,不再带冻结的 Python 后端。界面用 Vue 重写。合进来之前,新后端经同一个协议和 0.3.4 的后端逐个场景对比过。
  • 下载小得多:Windows 安装包、Windows 和 macOS 的便携版、macOS 版、deb 和新的小巧 Linux 便携版用 Tauri 2,界面跑在系统已有的网页视图里(Windows 上的 Microsoft Edge WebView2、macOS 上的 WebKit、Linux 上的 WebKitGTK 4.1),不再自带一整个 Chromium,后端也在应用里面运行,不再另起一个程序。只有在这跑不了的地方——rpm(RHEL 9 没有 WebKitGTK 4.1)、AppImage 和沿用 0.3.4 文件名的 Linux 便携版——仍用精简的 Electron 外壳包着同一套界面,它像 0.3.4 启动后端那样在旁边启动 spaceknife-cli serve。「设置 › 关于与更新 › 组件版本」里能看到一份副本用的是哪一种。Windows 上没有 WebView2 Runtime 或版本低于 89.0.774.44 时,SpaceKnife 退出之前弹窗说明,按钮打开微软的下载页(data 没有任何改动,在那之前可以用 SpaceKnife --headless)。
  • 扫描按文件夹自己调节并发:硬扫描按每次列目录等了多久,分出要等读盘的文件夹和已在文件缓存里的文件夹,两种各用自己的同时在列的个数,边扫边找,同一个盘第一次扫描就起作用;子文件夹先接父文件夹的判断,一部分在缓存里的树按各自的部分走。起步按盘的介质定(机械盘固定在一个深度),磁盘负载上限照旧封顶总量。在测过的盘上和以前一样快或更快,从缓存扫描时快得最多。
  • 删除篮快得多,读盘也少得多:Windows 上移到回收站不再把每一项交给 shell(它要把每个文件夹和整个回收站走一遍):回收站是你自己的文件夹、这一项也放得下时,SpaceKnife 像 shell 一样写下回收站的记录、把这一项改名放进去(否则仍交给 shell,移到回收站照旧绝不会变成永久删除)。回收站的占用按这些记录相加,不再走遍回收站;加进删除篮时只查新加的项有没有被程序占着。「永久删除」同时处理多项、多个文件夹,数量按盘的介质定(NVMe 8 个,其他 SSD 和网络位置 4 个,机械盘、U 盘、SD 卡 2 个),总是先删文件夹里面再删文件夹,每一步的检查照旧;exFAT、FAT 盘上每删一项少写一次盘。Linux 上每个盘的回收站只找一次,移进去的文件夹记下大小(directorysizes)。
  • Windows 安装包装在 0.3.4 原来的位置:SpaceKnife-<版本>-Setup-x64.exe 用 0.3.4 的卸载项、安装目录(当前用户 %LOCALAPPDATA%\Programs\SpaceKnife,所有用户 C:\Program Files\SpaceKnife)、快捷方式和「你的数据」页。装在 0.3.4 上时(「无缝更新」或手动运行),它用 0.3.4 自己的卸载程序移除 0.3.4(数据保留),把 0.3.5 装进同一个目录、装给同样的用户:应用列表里只有一个 SpaceKnife,开始菜单和桌面快捷方式还是原来那些。0.3.4 的注册表项不在了、文件还在时,也按文件认出它。缺少 Microsoft Edge WebView2 Runtime 时(部分 Windows 10 电脑)先装上它,这需要联网;版本低于 89.0.774.44(太旧,打不开窗口)时让它升级;做不到时什么都不改。「无缝更新」装不上 0.3.5 时,0.3.4 重新打开,并弹出消息说明原因和安装日志的位置(%TEMP%\SpaceKnife-install.log)。自己选的目录路径里没有「SpaceKnife」时,和 0.3.4 一样在后面加上 \SpaceKnife(D:\Tools 变成 D:\Tools\SpaceKnife);静默安装的 /D= 两种范围都认,照原样使用。更新和卸载只删安装程序装进去的文件(按它留在旁边的清单 installed-files.txt),文件夹空了才删:你放在里面的文件留着。
  • 小巧的 Linux 便携版,x64 和 arm64:SpaceKnife-<版本>-linux-<架构>-tauri.tar.gz,用系统的 WebKitGTK 4.1(Ubuntu 22.04 及以上、Debian 12、Fedora)。沿用 0.3.4 文件名的 Linux 便携版 SpaceKnife-<版本>-linux-<架构>-portable.tar.gz 自带引擎,RHEL 9 上也能用;0.3.4 的便携版会更新到它。想换成小巧的那种,解压它,再把旧副本的 data 文件夹复制进去。
  • 命令行程序是 spaceknife-cli(0.3.x 时是后端程序 resources/backend/spaceknife-backend),装在应用旁边,deb 和 rpm 把它放进 /usr/bin:scan、run、snapshot list / show、serve、headless、version。scan 的输出和 0.3.4 相同,脚本只要改路径。
  • 无头模式改成 spaceknife-cli headless [--listen <地址>] [--yes] [--tls-cert 证书 --tls-key 私钥] [--ui 目录],页面和 WebSocket 用同一个地址;它不需要显示器,也不需要桌面环境的库,服务器上有一个便携版 tar.gz 就够了。0.3.x 的启动写法仍然可用,服务单元和脚本照样能跑:--headless、--listen <地址> 放在参数里的任何位置;Windows 上在终端里输入 SpaceKnife --headless …(应用旁边的 SpaceKnife.com 启动 spaceknife-cli 并等它结束;不带这些参数时它打开窗口,和 0.3.x 一样等窗口关掉);Linux 上的 spaceknife --headless …、带 --headless 的 AppImage;macOS 上的 SpaceKnife.app/Contents/MacOS/SpaceKnife --headless …。便携版的无头模式和 0.3.x 一样把数据存在 data 文件夹里。在网络上开放之前的警告现在把链接能做的事都写全了:还能把文件写到你的账户能写的任何地方,还能在那台电脑上请求管理员权限。
  • 0.3.4 的每种安装方式都能更新到 0.3.5:发布文件沿用 0.3.4 的名字(SpaceKnife-<版本>-Setup-x64.exe、SpaceKnife-<版本>-x86_64.AppImage 及其 .zsync、spaceknife_<版本>_amd64.deb、spaceknife-<版本>.x86_64.rpm、SpaceKnife-<版本>-mac-<架构>.dmg 和便携版),0.3.4 的更新检查能找到 0.3.5(设成「只要正式版」的除外:0.x 的每个发布在 GitHub 上都标为预发布),像平常的更新一样装上。便携版的「无缝更新」从 0.3.4 也能用:程序名不变(SpaceKnife.exe、spaceknife、SpaceKnife.app),每个便携包都带着 0.3.x 要运行的替换助手。助手换文件之前先确认新版本能在这台电脑上启动(Windows 上要有 89.0.774.44 或更新的 WebView2 Runtime,小巧的 Linux 便携版要有 WebKitGTK 4.1);不能时什么都不换,SpaceKnife 说明原因(0.3.4 只短暂提示;Windows 上还会弹出一个窗口,说明缺什么、去哪里下载),旧的副本照常使用。换好文件后,助手启动新版本,最多等 90 秒让它启动起来;新版本在那之前出错退出,或者到时还没起来(这时把它关掉),就撤回这次更新、重新打开旧版本——前提是旧版本移开的文件还和移开时一样。无论哪种情况,之后都可以直接再点「无缝更新」。Windows 上的程序都自带 C 运行库,不需要另装 Visual C++ 运行库。
  • 更新:选了「只要正式版」(设置 › 关于与更新 › 提示哪些版本)时,现在也会提示 0.x 里版本号不带预发布段的发布;0.x 的每个发布在 GitHub 上都标为预发布,所以 0.3.4 在这里一个也不提示。Windows 上的更新检查也照系统的「自动检测设置」和设置脚本走代理,不只是手动设的代理服务器。从这一版起,便携版的「无缝更新」被撤回时,旧版本再次打开时会说出来,附上原因和日志(「更新没有完成:…」)。AppImage 的「无缝更新」先确认新版本能在这台电脑上启动,旧文件留成 <文件名>.previous 直到下一次更新。「打开安装包」先把 deb 复制到你的下载文件夹,Ubuntu 23.10 起的 App Center 才读得到。
  • 软件包的布局:deb 把 spaceknife 和 spaceknife-cli 装到 /usr/bin,其余文件放在 /usr/lib/SpaceKnife,不再放在 /opt/SpaceKnife,并依赖 WebKitGTK 4.1;包名仍是 spaceknife,应用菜单里的条目也相同,所以是对 0.3.4 那个包的普通升级。rpm 保留 0.3.4 的 /opt/SpaceKnife 和 /usr/bin 的链接,再加上 /usr/bin/spaceknife-cli。
  • 设置和数据还在原来的位置:设置、文件类别、归类的文件夹、记住的标签、命令面板的最近记录、更新记录和日志仍放在原来的文件夹里(Windows %LOCALAPPDATA%\SpaceKnife、macOS ~/Library/Application Support/SpaceKnife、Linux ~/.config/SpaceKnife 和 ~/.local/share/SpaceKnife),0.3.5 接着用;macOS 上设了 XDG_DATA_HOME / XDG_CONFIG_HOME / XDG_CACHE_HOME 的,和 0.3.x 一样到那里找。0.3.x 轮转下来的旧日志(logs/spaceknife.<时间>.log)在第一次启动时删掉。读不了的 classes.json / class_folders.json 不会被覆盖:下次保存时改名留在原处(classes.unreadable-<时间>.json)。Tauri 版把窗口自己的文件(主题、网页视图的数据)和后端的文件分开放(%LOCALAPPDATA%\io.github.duskxi.spaceknife 等),第一次启动时沿用 0.3.4 选的主题;Electron 版仍放在 0.3.4 的位置。
  • 0.3.x 的快照照样能用:0.3.x 存的快照(第 2 版)不用转换就能打开、对比,也出现在「最近」和对比列表里;0.3.5 新存的快照是第 3 版。自动保存的保留规则(最近 10 份,更早的每周留一份)也算上 0.3.x 的快照;读不了的快照文件(损坏的、更新版本的)从不删除。

修复

安全与稳妥的删除

  • 「在终端中打开」可能执行文件夹名的一部分(Windows):文件夹名里有 &、^、% 或括号(例如 x&calc)时,0.3.4 把名字交给命令提示符,后半段会被当成命令执行。现在直接启动终端,从不经过 shell。
  • 「永久删除」不会删到你选的范围之外:删除文件夹时不再用名字拼出其中各项的路径,所以文件系统列出的、名字里带 \ 或 .. 的项(WinBtrfs 盘上的 Linux 文件)不会通到文件夹外面;删除过程中被换成链接的文件夹不会被跟进;Linux 上不再进入文件夹里的 bind mount(0.3.4 会在那里删掉它源头的文件),bind mount 也和其他挂载点一样受保护。
  • 删除篮只删你确认过的项:确认框开着时别的窗口或无头模式的浏览器加进来的项不会被删,两次删除也不能同时开始。
  • 「打开」「在资源管理器中显示」「在此打开终端」不再把系统会当成另一项的名字交出去(Windows 会去掉名字末尾的点或空格:对 setup. 点「打开」,启动的是旁边的 setup),也不再交出不是合法 Unicode 的名字;这些项的命令显示为灰色,并说明原因。这样的名字和 0.3.4 一样显示成转义的写法(Linux 和 macOS 上是 \xff,Windows 上是 \udc80):列表、路径、删除篮和命令面板里都是(命令面板也认这种写法),视图上画出的标签里是 ?。
  • 发布里列出了 SHA-256 才下载更新:0.3.4 会下载没有公布校验值的文件,标为未经校验;现在不下载,卡片说明原因。
  • 便携版的「无缝更新」不再把你的文件一起带走:0.3.4 把副本文件夹里除 data 以外的东西全部移开,新版本启动时删掉,放在 SpaceKnife.exe 旁边的文件或别的程序(放工具的文件夹、桌面上)就这样丢了。现在只移动 SpaceKnife 自己的文件,系统的文件(desktop.ini、.DS_Store 等)留在原处;文件夹里还有别的东西时什么都不更新,并列出其中最多三个:请把 SpaceKnife 和它的 data 单独放进一个文件夹,或用「自己替换」。从 0.3.4 更新时也受这层保护,因为换文件的是新版本的助手。

其他修复

  • Linux 上没有 x-terminal-emulator 时(RHEL 9、Fedora),「在终端中打开」什么也不打开;现在启动装了的第一个:GNOME Terminal、Ptyxis、Console、Konsole、Xfce Terminal、MATE Terminal、Tilix、xterm。
  • 卸载 rpm 后 /opt 里不再留下东西:0.3.4 的 rpm 不拥有自己的文件夹,dnf remove 之后会留下空的 /opt/SpaceKnife。现在 rpm 拥有这些文件夹;从 0.3.4 更新时,0.3.4 的后端在 /opt/SpaceKnife/resources/backend 里留下的空文件夹也会删掉。
  • exFAT、FAT 盘上移到回收站之后能撤销(Windows):这两种盘上的回收站是所有用户共用的一个,没有每个用户自己的文件夹,0.3.4 撤销时报「不是可还原的回收站条目」。现在撤销能放回原处。
  • 删除篮说清删不掉、移不进回收站的原因:不再只给系统的原话(常常像「参数错误」一样说不清),而是按界面语言说是什么:被占用、没有权限、介质只读(写保护或只读挂载)、磁盘已满、I/O 错误、设备未就绪、网络连接断了、这个文件系统不支持、名字或路径这个文件系统不接受、文件系统损坏(请先检查磁盘),或 OneDrive 等云同步程序不允许;「部分内容未能删除」后面接的也是原因。Windows 上别的程序在删除时还开着的文件不再报「没有权限」:文件夹再等约 1 秒,然后说明里面的内容已删除、还有程序开着其中的文件,稍后再删一次即可。Linux 上文件夹里的 Btrfs 子卷(例如快照)照实说,并提示用 btrfs subvolume delete 删除,不再说成另一个卷的挂载点;macOS 上别的盘上的项进那个盘自己的 .Trashes,删除篮也这样显示,不支持废纸篓的盘说明只能永久删除。
  • 命令行输出到 NUL:scan 的输出送到 NUL(命令提示符里的 > NUL、Git Bash 里的 >/dev/null)时会报错退出、不存快照;现在照常完成并保存快照。
  • 命令行的英文单数:有一个文件夹读不了的扫描写「1 folder couldn't be accessed」,snapshot list 写「1 snapshot in …」,snapshot show 写「· 1 item ·」。感谢 @swastiktawate(#9)。

已知限制

  • 都还没有代码签名或公证(macOS 版是 ad-hoc 签名)。
  • 0.3.5 存的快照(第 3 版)0.3.x 打不开:退回 0.3.x 时只看得到它自己存的快照。
  • macOS 的 dmg 和 deb / rpm 仍没有「无缝更新」:卡片会打开磁盘映像或安装包。
  • 在 Ubuntu 23.10 及以后从 0.3.4 更新时,「打开安装包」可能打不开 deb:0.3.4 从它隐藏的 updates 文件夹(~/.local/share/SpaceKnife/updates)打开,App Center(snap)读不到那里。请在本页下载 deb 再打开,或运行 sudo apt install ./spaceknife_0.3.5_amd64.deb。0.3.5 会先把安装包复制到下载文件夹再打开。
  • ARM 便携版只在 GitHub 的 ARM 运行器上构建和测试过,还没在 ARM 真机上试过;安装包只有 x64。
  • 还没有人工试过的:在没有 WebView2 Runtime 的干净 Windows 10 上从 0.3.4 更新、为所有用户安装时的管理员授权提示,以及在 Ubuntu 22.04 和 RHEL 9 的软件中心里打开 deb、rpm。
  • 在限制非特权用户命名空间的发行版上(Ubuntu 23.10 起),AppImage 和便携版 …-linux-<架构>-portable.tar.gz 可能要加 --no-sandbox,和 0.3.4 一样;deb 和小巧的便携版不用。
  • WinBtrfs 盘上两个只差大小写的文件夹,从其中一个(或它里面的文件夹)开始扫描,到达的是另一个,资源管理器和复制出去的路径也一样;请扫描包含两者的文件夹。
  • macOS 上「本机磁盘」这一版读不到 NVMe 盘自己的健康记录(累计读写、温度、通电时间、剩余寿命),0.3.4 能读;开机以来的读写照常显示。计划在下一版补上。
  • macOS 上网页视图自己的数据(页面存储与缓存)总在 ~/Library/WebKit/io.github.duskxi.spaceknife,便携版和设了 SPACEKNIFE_HOME 时也一样:WKWebView 不接受指定的文件夹。设置、快照、日志和缓存仍在原来的位置(便携版在它的 data 文件夹里)。

许可证:MIT。第三方许可证在随应用一起装好的 licenses 文件夹里(Electron 版在 resources/licenses):THIRD-PARTY-rust.txt 和 THIRD-PARTY-ui.txt。