LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 02-14-2020, 03:33 AM   #1
Shajirr
LQ Newbie
 
Registered: Feb 2020
Distribution: Manjaro KDE
Posts: 11

Rep: Reputation: Disabled
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"

2) Rclick source file -> choose "Pick Source"
Rclick in destination folder, choose "Drop As->Hardlink"

No consoles or typing required.

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.

Last edited by Shajirr; 02-14-2020 at 03:34 AM.
 
Old 02-14-2020, 05:24 AM   #2
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: A few
Posts: 4,154

Rep: Reputation: 1169Reputation: 1169Reputation: 1169Reputation: 1169Reputation: 1169Reputation: 1169Reputation: 1169Reputation: 1169Reputation: 1169
Gnome's file manager Nautilus can be convinced to do it.
 
1 members found this post helpful.
Old 02-14-2020, 05:54 AM   #3
mrmazda
Senior Member
 
Registered: Aug 2016
Location: USA
Distribution: openSUSE, Debian, Knoppix, Mageia, Fedora, others
Posts: 2,198

Rep: Reputation: 702Reputation: 702Reputation: 702Reputation: 702Reputation: 702Reputation: 702Reputation: 702
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).
 
1 members found this post helpful.
Old 02-14-2020, 07:43 AM   #4
Shajirr
LQ Newbie
 
Registered: Feb 2020
Distribution: Manjaro KDE
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by mrmazda View Post
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.
 
Old 02-14-2020, 07:46 AM   #5
Shajirr
LQ Newbie
 
Registered: Feb 2020
Distribution: Manjaro KDE
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
Gnome's file manager Nautilus can be convinced to do it.
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?

Last edited by Shajirr; 02-14-2020 at 08:35 AM.
 
Old 02-14-2020, 10:04 AM   #6
mrmazda
Senior Member
 
Registered: Aug 2016
Location: USA
Distribution: openSUSE, Debian, Knoppix, Mageia, Fedora, others
Posts: 2,198

Rep: Reputation: 702Reputation: 702Reputation: 702Reputation: 702Reputation: 702Reputation: 702Reputation: 702
Quote:
Originally Posted by Shajirr View Post
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.
 
Old 02-15-2020, 01:55 AM   #7
kreemoweet
LQ Newbie
 
Registered: Jun 2017
Posts: 2

Rep: Reputation: Disabled
Quote:
Originally Posted by Shajirr
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Rsync not copying hardlinks as hardlinks OralDeckard Linux - General 14 09-15-2011 02:48 PM
Cd image with hardlinks kvtournh Linux - Software 2 08-27-2006 06:22 AM
Lotsa hardlinks - how do I find the others? humbletech99 Linux - General 6 11-27-2005 02:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration