filetags
filetags copied to clipboard
CLI parameter to switch between: use symlink, hardlink, or copy
Non-Windows systems do not only know lnk files but also symbolic links and hard links.
I'd like to be able to choose for tagtrees and filter functionality whether or not (1) lnk files or symlinks are being used (2) hard links are used or (3) file get copied instead.
Support for hardlinks got added with 49179d4.
Negative impact of using copy instead of links need to be investigated. This could really fill up disk space easily. Therefore, I'm unsure if this idea is still worth following.
As a comment:
-
Running out of physical space in a partition, or available index nodes (which may occur early when processing many small files) may be recognized as OSError Python reports back in lines of «disk full».
-
Running filetags with Linux Debian 12 in lines of
~/archive$ filetags --filter --hardlinks --recursive
(already) yields self sufficient files one may sent e.g., by email to a colleague (if the OS supports hardlinks); this equally may «saturate» a disk partition/thumb drive.
On the other hand, if I drop --hardlinks
and subsequently access the folder of links filetags created, file manager Thunar both states the number of the files .and. the size of the files the links point to (e.g., 7.1MB) -- though the folder's content (i.e., the links) is much smaller (e.g., du -h
reports 132K). So filetags already offers (an implicit) approach to avoid disk saturation by criterion of volume when retrieving the files.
Careful: when using hardlinks, the situation is somewhat non-intuitive for somebody not familiar with the implementation details of symbolic and hard links. For example, you get disk usage reported multiple times via listing directory contents (containing hard links) separately although the overall free disk space is not (or minimal) changed. So you can't use this criteria to compare disk usage.
AFAIR symbolic links use one inode size per link and hardlinks may only use a directory entry which is smaller than an inode if I remember correctly.