PDA

View Full Version : [SOLVED] Problem creating symlinks in xubuntu



daKoolaid
September 25th, 2012, 10:50 PM
I'm used to nautilus in Mint where you simply right click on a file or folder and do Make Link. It creates a link in that same folder which you can then put anywhere you like.

Xubuntu doesn't come with this and adding a custom action into Thunar for
"ln -s %f Link to %n"
doesn't create anything.

If I try something like
"ln -s /file to copy /folder the file is in"
then terminal says the file already exists, which it does. I want a link to the file that already exists.

The ln man page didn't clear anything up, wasn't expecting this to be so difficult. Any tips for a noob?

jerrrys
September 25th, 2012, 11:14 PM
Maybe this will make sense to you

https://help.ubuntu.com/community/ThunarCustomActions#Create_Symlink

Found that here

http://www.googlubuntu.com/results/?cx=006238239194895611142%3Au-ocqbntw_o&cof=FORID%3A9&ie=UTF-8&q=creating+symlinks+in+thunar&as_qdr=all&sa=Google+Search&lang=en&siteurl=http%3A%2F%2Fwww.googlubuntu.com%2F

steeldriver
September 25th, 2012, 11:37 PM
This seemed to work for me:

In Thunar --> Configure custom actions... (+)


Name: Create symlink here
Description: Create symlink of file (in local dir)
Command: /bin/ln -s %f "Link to %n"
$ ls -l | grep myfile
lrwxrwxrwx 1 steeldriver steeldriver 20 Sep 25 18:26 Link to 'myfile' -> /home/steeldriver/myfile
-rw-r--r-- 1 steeldriver steeldriver 80 Aug 19 14:41 myfileIf you want it to overwrite an existing file you will need to add '-f' (force) to the ln command, I think

daKoolaid
September 26th, 2012, 01:08 AM
This seemed to work for me:

In Thunar --> Configure custom actions... (+)


Name: Create symlink here
Description: Create symlink of file (in local dir)
Command: /bin/ln -s %f "Link to %n"
$ ls -l | grep myfile
lrwxrwxrwx 1 steeldriver steeldriver 20 Sep 25 18:26 Link to 'myfile' -> /home/steeldriver/myfile
-rw-r--r-- 1 steeldriver steeldriver 80 Aug 19 14:41 myfileIf you want it to overwrite an existing file you will need to add '-f' (force) to the ln command, I think

THANK YOU!! That did exactly what I was looking for.

LewisTM
September 26th, 2012, 01:45 AM
FYI Thunar DOES have a built-in way of creating symlinks. In fact, it has two:

1) Select your item(s) then go to Edit->Make Link
2) Select your item(s), then drag and drop while holding Ctrl-Shift

Cheers!