Any way to create hardlinks fast / Linux alternative to Link Shell Extension?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Any way to create hardlinks fast / Linux alternative to Link Shell Extension?
Is there any way to replicate what Link Shell Extension does on Windows - allowing you to create hardlinks quickly by drag-and-drop, or using file context menu?
Currently on Windows I can either:
1) Drag the file from source to destination folder holding rclick, on releasing it in the context menu I select "Drop As->Hardlink"
Meanwhile on Linux:
open console, type in ln, go to source folder, copy path, paste into console, go to source folder again, copy filename, go to console again, add filename to the filepath, repeat the procedure for destination folder, activate the command, hope that you copied and pasted everything exactly or the command won't work.
Are there any alternatives on Linux mirroring what Link Shell Extension allows to do?
My searches turned up nothing so far.
Dolphin can create symlinks by drag-and-drop in nearly the same way I described above, but there is no way to do the same for hardlinks, despite the underlying command which is being executed only being different by one flag. There is a feature request for this - its been ignored for like 10 years.
In MC, one first picks the source, next picks the destination, then selects link from menu, then confirms, very fast using keyboard whether or not in a GUI session, but a rodent can do the same thing also whether in terminal or GUI (I've never tried the rodent method).
In MC, one first picks the source, next picks the destination, then selects link from menu, then confirms, very fast using keyboard whether or not in a GUI session, but a rodent can do the same thing also whether in terminal or GUI (I've never tried the rodent method).
Rodent doesn't seem to provide any specific functionality. I found nothing in the user manual except for references to default ln command.
MC will probably be useful, if anything just for mass-renaming, but the issue is that since its terminal-based, it doesn't provide file previews which are sometimes needed for images.
This looks like a decent option, the problem however is that it does not replicate the needed functionality fully.
The hardlink is created in the same folder, so it can't have the same name, and it needs to be placed in the destination separately, and possibly renamed so that it would have the same name as original.
Is there any way to get the destination of a drag-and-drop operation from any file manager and transfer it to the script?
Another idea - currently the script is missing the destination parameter for creating the link command, so it just creates it in the source folder.
Would it then be possible to modify the script so it would take the destination variable from the clipboard buffer?
MC will probably be useful, if anything just for mass-renaming, but the issue is that since its terminal-based, it doesn't provide file previews which are sometimes needed for images.
I have a different usage paradigm. I run 8 virtual desktops, an image previewer on one, and MC on others.
Would it then be possible to modify the script so it would take the destination variable from the clipboard buffer?
You can modify the script to do just about anything you want. You can invoke a folder-selection dialog (provided by something like the Yad or Zenity
package) to specify where you want the hardlink to be created, a text-entry dialog (from ditto) to give the hardlink a name, etc.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.