Discussion:
[Thunar-dev] Hardlinking instead of moving
martin f krafft
2014-02-13 17:59:57 UTC
Permalink
Hello,

I am a user, not a developer, but I have a question I couldn't get
answered elsewhere.

We are looking for a tool to assist us in a reorganising of a very
large file base. In Thunar, we believe to have found a very good
tool for the task.

But we have one question: when we click-drag a file to another
folder on the same filesystem, it gets moved and copied if the
destination is on a different filesystem. If we use the right mouse
button, we can `chose to copy or symlink instead.

But what we would really like to do is create hardlinks instead of
moving! Ideally by default, i.e. when we drag with the left mouse
button.

Can you imagine an easy way how we could configure/change Thunar to
create hardlinks by default when files are dragged to a destination
on the same filesystem?

Thank you for any hints!
--
martin | http://madduck.net/ | http://two.sentenc.es/

"gott ist tot! und wir haben ihn get?tet."
- friedrich nietzsche

spamtraps: madduck.bogus at madduck.net
Sylvain Viart
2014-02-14 09:48:45 UTC
Permalink
Hi Martin,
Post by martin f krafft
I am a user, not a developer, but I have a question I couldn't get
answered elsewhere.
Do you have, some command line skill, though?
Post by martin f krafft
We are looking for a tool to assist us in a reorganising of a very
large file base. In Thunar, we believe to have found a very good
tool for the task.
What do you mean by very large?
How many GB, TB or millions of file/folder?
Post by martin f krafft
But what we would really like to do is create hardlinks instead of
moving! Ideally by default, i.e. when we drag with the left mouse
button.
Can you imagine an easy way how we could configure/change Thunar to
create hardlinks by default when files are dragged to a destination
on the same filesystem?
If you have some bash programming skill, you can code a small shell
script which can handle a custom action.
For example, if by "In Thunar, we believe to have found a very good tool
for the task" you mean: we can visually select files we want?

* Select multiple folders or files
* right click
* chose your custom script
* the selected files list will be passed to your script

of course, you may eventually miss a destination folder?

You could setup, 2 custom scripts? one doing the "copy" storing the file
list in a temporary file.
The other script performing the hardlinking?

Would it match the behavior you needed?

or another hint, code a totally different script which will convert
symlink to hardlink?
you will run it in batch mode after making all the "drag and drop" job.

Regards,
Sylvain.
--
Sylvain Viart - Consultant Informatique Syst?me et performance - gestion de projet

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.xfce.org/pipermail/thunar-dev/attachments/20140214/84de3c46/attachment.html>
martin f krafft
2014-02-14 15:29:14 UTC
Permalink
Post by Sylvain Viart
Post by martin f krafft
I am a user, not a developer, but I have a question I couldn't get
answered elsewhere.
Do you have, some command line skill, though?
Certainly ;)

But we'd prefer not to type endlessly.
Post by Sylvain Viart
What do you mean by very large?
How many GB, TB or millions of file/folder?
We have 8.9 million files to reorganise. Most of it comes in batches
of 10?50k files and we have plenty of people working on the task, so
it's not too much, but we'd all get tendonitis typing /bin/mv or
/bin/ln.
Post by Sylvain Viart
If you have some bash programming skill, you can code a small shell
script which can handle a custom action.
Right, is it possible to make that custom action the default for
a left-click drag?
--
martin | http://madduck.net/ | http://two.sentenc.es/

"the most exciting phrase to hear in science, the one that heralds
new discoveries, is not 'eureka!' but 'that's funny...'"
-- isaac asimov

spamtraps: madduck.bogus at madduck.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: digital_signature_gpg.asc
Type: application/pgp-signature
Size: 1107 bytes
Desc: Digital signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)
URL: <http://mail.xfce.org/pipermail/thunar-dev/attachments/20140214/def5fe28/attachment.sig>
Loading...