How to make a symbolic link

in Linux

Comments

  1. #1 D. C. Sessions
    March 28, 2009

    Or, in konqueror, you can drag the target (in the example given, /var/log) to the location where you want a link (~). Rename if you feel like it.

    Dunno if Nautilus has that ability or not. konq is pretty much the übergeek’s Leatherman of file managers. Did you know that you can enter a URL such as:

    sftp://dcs@foo.bar.com/home/dcs/pr0n

    to browse your home porn collection remotely?

  2. #2 NewEnglandBob
    March 28, 2009

    This is so timely. I think I learned this 30 years ago.

  3. #3 Greg Laden
    March 28, 2009

    Bob: What about all the peopole who were born 29 years ago after the rest of the world learned about it?

    Yes, Nautilus does this, I think.

  4. #4 Tony P
    March 28, 2009

    ln -s {source} {destination/pointer}

    Not too difficult.

    So for example to link your /etc dir you’d just

    ln -s /etc config_files

  5. #5 386sx
    March 29, 2009

    You can make those in Windows too, you know. Yes, hard links too.

  6. #6 Wayne Conrad
    March 29, 2009

    Another cool thing about ln -s. If you want to drop a symlink in the current directory with the same name as what you are linking to, you can leave off the target and just name the source. So:

    ln -s /foo/bar

    will create a symlink “bar” in the current directory pointing to /foo/bar.

  7. #7 Wayne Conrad
    March 29, 2009

    I’m an idiot. Or, more precisely, a short-on-sleep insomniac. I should have said, you can leave off the destination and name only the target.

Current ye@r *