[Thunar-dev] Hardlinking instead of moving

Sylvain Viart sylvain at opensource-expert.com
Fri Feb 14 10:48:45 CET 2014


Hi Martin,

Le 13/02/2014 18:59, martin f krafft a écrit :
> 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?

> 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?

> 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>


More information about the Thunar-dev mailing list