You are not logged in.
There was an old feature in Windows that somehow bind files to each other. Try this on Windows: Ctrl+S to save this page as HTML, then rename the HTML file, you'll get a dialog like:
If you rename this file, it will no longer blong to the folder 'Linux - Wikipedia_files'
https://i.imgur.com/lSNh2Cn.png
And when the html file is moved to another location, its asset directory is also moved.
The use cases for this are plenty. The most common one is when you have a lot of markdown files with corresponding asset directories (think of static websites generators).
When I switched to Linux, I just accepted this might require a lot of work to get implemented. But I was just looking into Extended attributes and thought it might be way easier. Of course, every file manager (and perhaps CLI utilities) might need to be reworked to respect the attached xattr, but it still simplifies the job. What are your thoughts?
moderator edit -- replaced oversized image with link.
Pasting pictures and code
Last edited by 2ManyDogs (2023-08-09 11:04:29)
Offline
I'd argue that this has no place in low-level tools like mv.
In a file manager, it might be useful in very few cases, but probably not worth the effort.
When I am coding I use the refactoring functions of my IDE to rename files in order to automatically adjust potential imports.
This is the only place I can think of where I ever needed such a functionality and actually used it.
Inofficial first vice president of the Rust Evangelism Strike Force
Offline
Looks like Windows is using this interesting filesystem feature to achieve that: https://en.wikipedia.org/wiki/Fork_(file_system)
Offline