Hardlinking instead of moving

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Hardlinking instead of moving

martin f krafft
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: [hidden email]

_______________________________________________
Thunar-dev mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/thunar-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Hardlinking instead of moving

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

_______________________________________________
Thunar-dev mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/thunar-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Hardlinking instead of moving

martin f krafft
also sprach Sylvain Viart <[hidden email]> [2014-02-14 11:30 +0100]:
> >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.

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

> 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: [hidden email]

_______________________________________________
Thunar-dev mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/thunar-dev

digital_signature_gpg.asc (1K) Download Attachment
Loading...