9

Ubuntu 16.04 I have 2 instances of Nautilus (file explorer) open - in different drives and or folders.

I want to create a LINK to a file. It doesn't appear to be easily done - if I drag & drop the file it makes a copy. If I right-click the file the menu does have a 'Make Link', but it makes the link in the folder the file already is in (why would I want that?) - and I have to then drag the link to the place I want, which makes a copy of the link, and then I have to delete the link made in the place I don't want. Seems like very inefficient way. So, I'm probably missing something....?

RRelax
  • 231
  • 1
  • 2
  • 7
  • Maybe press Alt while dragging? – muru Aug 01 '17 at 01:24
  • @WinEunuuchs2Unix not sarcasm. In Nemo, different things happen when you do a simple drag (move if in same partition), vs drag with Ctrl (copy), vs drag with Alt (link), etc. I don't remember if it works that way in Nautilus. – muru Aug 01 '17 at 02:00
  • @muru I just tested OP's question, and simply dragging the created link (with left click) from one Nautilus Window to another Nautilus Window of a different folder moves it rather than copies it. ie No deletion of original link is required as OP asserts. So now I'm just confused and will go find some CLI project to do... – WinEunuuchs2Unix Aug 01 '17 at 02:11
  • @muru I'm using Nemo 2.8.7, and pressing Alt while dragging brings up the same menu that SunnyDaze has pictured in his answer, and drag with Ctrl doesn't seem to do anything. What version of Nemo are you running? – wjandrea Aug 01 '17 at 03:38
  • @wjandrea huh, looks like I mixed up the behaviour with Windows Explorer, which is where I usually have to use the GUI from dragging – muru Aug 01 '17 at 04:06
  • 1
    @WinEunuuchs2Unix - About the drag/drop making copy of file vs move: I think I'm getting the move because the source and target are different physical drives/different volumes? - getting a copy. My guess is that if source and target are part of same drive/volume it would do a move instead? – RRelax Aug 03 '17 at 05:21
  • @RRelax I can confirm that on my machine: Dragging between folders on same partition results in **move**, dragging between different drives performs a **copy**. Please note that internally a move command is really a rename and it's impossible to rename a file between different drives so in that case they have to be copied. – WinEunuuchs2Unix Aug 03 '17 at 10:15

6 Answers6

18

1. If your Mouse Has a Center Button

You just Center-Click and drag the file to where you want it to go, and when you release the center-button/wheel, a menu will pop up asking you if you want to Move, Copy, or Link the file.

Choose Link, of course.

2. If Your Mouse DOESN'T Have a Center Button

You Left-Click and drag the file to where you want it to go, but right before you release the left-button, hold down the Alt key, then release the left-button, and a menu will pop up asking you if you want to Move, Copy, or Link the file.

Choose Link, of course.

Here's a picture of what the menu looks like.

enter image description here

SunnyDaze
  • 1,351
  • 9
  • 13
  • My mice don't have center clicks. All the scroll wheel does is... well scroll. – WinEunuuchs2Unix Aug 01 '17 at 01:55
  • 1
    Oh darn. Life in Linux is so much easier with a 10-button mouse. The first 7 buttons have great default values, and then I use CCSM to set up the buttons 8 and 10 (thumb buttons) to initiate my desktop picker, and to initiate my windows picker. These CCSM features are just a few of the little things that makes the Linux desktop much more efficient than a typical Windows experience. – SunnyDaze Aug 01 '17 at 02:36
  • There, I figured it out for you. I added the "No Center Button" answer. Please select this answer as the solution if you like it. – SunnyDaze Aug 01 '17 at 02:45
  • I think my mouse has 9 buttons, it's a Logitech Pro MX: https://www.logitech.com/en-ca/product/performance-mouse-mx I spend more time tinkering in bash though than in mouse tinkering. I think your emulating center button will be valuable for the mainstream though. – WinEunuuchs2Unix Aug 01 '17 at 03:01
  • 1
    @WinEunuuchs2Unix The Pro MX has a middle click... – wjandrea Aug 01 '17 at 03:35
  • @wjandrea So right you are. Never used it and had no idea it was there *blush*. Makes sense for the most expensive mouse though. Original point is still valid because all the $5 mice at work have no scroll wheels and definitely no center button. – WinEunuuchs2Unix Aug 01 '17 at 03:43
  • @WinEunuuchs2Unix if you have no wheel and no middle button, press both left and right buttons together (same for laptops having both buttons) – muru Aug 01 '17 at 04:05
  • @muru I recall reading that a couple decades ago... thanks for the refresher course :) That said, I still haven't used center click other than in an experiment 20+ years ago... whilst going through some tutorial or something. Like I previously confessed I'm definitely GUI challenged. – WinEunuuchs2Unix Aug 01 '17 at 04:08
  • Thanks! This works - (I had tried holding down ALT before clicking, but that just moves the window - didn't try the ALT after the drag. I do have a middle mouse button/wheel, but find do not like using it... either way is working though). – RRelax Aug 03 '17 at 05:18
  • You should select this answer as being your solution, so people know it was solved. – SunnyDaze Aug 04 '17 at 23:44
6

Yet another way to make a link: press Ctrl+Shift while dragging some file/folder.

So:

  • Ctrl performs copy or move (that depends on location of source and destination: within the same partition object is moved, otherwise it is copied);
  • Ctrl+Shift makes a link;
  • Alt gives user a choice to select manually.

Also my cursor changes shape when I drag with Ctrl (shows "plus" sign) and with Ctrl+Shift (shows 2 linked rings). Dunno whether this happens with standard cursor theme.

whtyger
  • 5,710
  • 3
  • 32
  • 45
1

After you click "Make link":

  1. Click the link and press Ctrl+X
    • or right-click the link and click "Cut"
  2. Move to the folder you want
  3. Press Ctrl+V
    • or right-click in blank space and click "Paste"
wjandrea
  • 14,109
  • 4
  • 48
  • 98
0

And finally convert the link from absolute to relative by clicking Right-click-scripts-myscript (http://papou.epizy.com/notes/symbolic_link/)

Papou
  • 129
  • 1
  • 5
0

On my 21.04 this works:

  1. CTRL + SHIFT within Nautilus
  2. move the link created to the desktop

Directly making a link to the desktop does not work for me.

Christians
  • 594
  • 7
  • 15
0

https://github.com/tassaron/symlink-editor

My file-viewer does not have this option. And symlink-editor can not only add, but also edit symlinks.

enter image description here

JoKalliauer
  • 1,457
  • 2
  • 16
  • 26