The symlink itself is fine. However upon deleting a file via Thunar, I get error popup, saying Unable to trash file ... across filesystem boundaries. (Which is true because /mnt/hd1 is a different disk altogether)
Is there a working method to permanently make my trash folder reside on a different disk?
I’m often deleting lots of files while sorting through tens of gigabytes of pictures/ videos the family clicks, and having everything end up on my SSD feels like wastage of write cycles.
System - i3wm. Using Thunar as file manager, Ristretto as image viewer, and MPV as video player.
Edit: Didn’t need to do anything. Files aren’t being moved to SSD, so no purpose for changing Trash location.
Eh? As long as the files and trash are on the same partition, there is a pretty minimal write there since the file itself doesn’t need to move. It just updates the path to the file.
If you put your trash on a different partition, you will need to wait for the file to copied to that partition and then deleted from the current partition.
As @dalto said, when a file is deleted it is not copied to Trash. It is moved and moving files does not cause them to physically change place on the drive. Instead, a new inode is created in the filesystem that points to the same data on the drive, and the old inode is removed. This is why moving huge files on the same filesystem is neary instantaneous. And also why hard links must point to the same filesystem.
Moving files to another filesystem necessarily involves copying them byte for byte, which is the reason why it is so slow.
Umm, I have no idea how the files are actually moved
When I delete files from my HDD, I can see them when I click “Trash” shortcut on left bar in Thunar.
Is there a way to check how / where the files are exactly being copied? Maybe the files I see in Trash are just a symlink (or some kind of link) to the files which are residing on HDD?
If it happens almost instantaneously for very large files, they are certainly being moved within the same filesystem (with data remaining at the same physical location on the drive) rather than being copied byte by byte, which takes noticeably long, even on fastest SSDs.
Yeah, only inodes (think of them as pointers in C) are being moved, the actual data stays on the same sectors. Even when you empty the Trash, the data is still there, only there is no inode pointing to it so the filesystem is free to overwrite that storage at a later point, when needed.
tl;dr - I didn’t research enough before making this post.
Ran find with the deleted file name, and apparently, the file deleted from my HDD remain on HDD, and is there in .Trash-1000/files. Compared folder sizes too; nothing is being moved to my SSD.