Results 1 to 5 of 5

Thread: Problem creating symlinks in xubuntu

  1. #1
    Join Date
    Jul 2012
    Beans
    48

    Problem creating symlinks in xubuntu

    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?

  2. #2
    Join Date
    Nov 2008
    Beans
    Hidden!

    Re: Problem creating symlinks in xubuntu


  3. #3
    Join Date
    Apr 2012
    Beans
    7,256

    Re: Problem creating symlinks in xubuntu

    This seemed to work for me:

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

    Code:
    Name: Create symlink here
    Description: Create symlink of file (in local dir)
    Command: /bin/ln -s %f "Link to %n"
    Code:
    $ 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 myfile
    If you want it to overwrite an existing file you will need to add '-f' (force) to the ln command, I think

  4. #4
    Join Date
    Jul 2012
    Beans
    48

    Re: Problem creating symlinks in xubuntu

    Quote Originally Posted by steeldriver View Post
    This seemed to work for me:

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

    Code:
    Name: Create symlink here
    Description: Create symlink of file (in local dir)
    Command: /bin/ln -s %f "Link to %n"
    Code:
    $ 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 myfile
    If 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.

  5. #5
    Join Date
    Oct 2008
    Location
    Ottawa, Canada
    Beans
    813
    Distro
    Kubuntu 20.04 Focal Fossa

    Re: Problem creating symlinks in xubuntu

    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!
    husband@wife$ make sandwich
    Permission denied
    husband@wife$ sudo make sandwich

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •