58
linuxxx
6y

Today was hell on earth as for user support. Phone going non stop, tickets coming in faster than we were able to process.

At the end of the day I had to make a symlink for a customer which is fine. But, the day was so busy that I just couldn't focus anymore.
I've made 1K+ symlinks in my life probably but I couldn't remember if the source or destination comes first with a symlink.... The day has been hell and I just couldn't bring up a single second of focus anymore..

Fuck it, I'll do it tomorrow. I know I can do this but I don't trust myself with this right now in case of a huge webshop (swap the source/destination: webshop gone).

I think I'll thank myself for this tomorrow.

Comments
  • 3
    I guess that's why it has a -T option.

    Ps. Also that's why there's a man page.
  • 6
    @beleg I stared at the command for a minute and couldn't figure out if I was doing it right.

    As said, I've done this so many times but for my own safety I just didn't do it.
  • 1
    Doesn’t symlinking also fail if the source is invalid or if the destination exists already?
  • 5
    @gilerean if the destination exists it'll be over written I thought...
  • 3
    @linuxxx it does.

    Which is fun when it’s a /var/www/ symlink.
  • 2
    Sorry, I was hanging around :/
  • 1
    @linuxxx @C0D4 i thought it only replaced if you used -f but first is source cause you can create a symlink in the current directory by omiting the destination
  • 2
    @linuxxx @C0D4 @PerfectAsshole designation apparently doesn't get overwritten if it exists
  • 2
    @Condor yeah that's what i thought
  • 1
    I usually do it the wrong way around on the first try and get the 'File exists' error, every time...

    If you think about it for more than 1s it is pretty obvious (same behaviour as CP and mv, src first then dest)... but who likes thinking...
  • 3
    Every time I make a symlink I end up searching my shell history for the last time I did it cause I can never remember and can't be bothered to read the man page
  • 1
    Same today with junction on windows… Every time I run it without parameters first to check what comes first
  • 1
    Failsafe way to create a simlink:
    $ cd /path/to/destination
    $ ln -s /path/to/target

    Done
Add Comment