← Back to context

Comment by Dachande663

4 years ago

I feel almost embarassed for sharing some of these, but I either remember things the first time I'm exposed to them or am forever doomed to have to look them up.

    ln -s /the/target the_link (can never remember order)

    for f in *.mp4; do mv "$f" "$(echo "$f" | sed s/S1E/S01E/)"; done

    tar -theuniverse (insert xkcd here)

    grep -E 'foo|bar' file (can never remember the flag for regex)

I started remembering the order for ln when I think of it as a copy which just happens to be special. cp SRC DEST is intuitive to me so I just hang ln off that.

  • I did that as well, also running cp with the -s argument will create a symlink

25 years into this and i still have to look up the ln order. I know for more complex things, but this damn order won't stick in my mind.