Re:/ vs. \ confuses me a lot, how do you remember them?
by mikewarot on Monday October 10, 2022 @05:13AM
(#33149358)
Slash - Normal fractions, division, and conversational use all use / as in 1/2 x/y he/she etc. I describe it over the phone as the one under the question mark.
Backslash - Not used much except in Linux, C, etc. As others have said, path separations, quoting characters, etc. \n is a linefeed in most quoted strings. I describe this as the slash not under the question mark
Now, paths on Unix use / because \ is already in use... so you end up with /home/mike
Lastly, DOS, and thus Windows, had to use \ because they needed to be as different as possible from Unix (to avoid lawsuits)... and thus you end up with C:\DOS
Backslash - Not used much except in Linux, C, etc. As others have said, path separations, quoting characters, etc. \n is a linefeed in most quoted strings. I describe this as the slash not under the question mark
Now, paths on Unix use / because \ is already in use... so you end up with /home/mike
Lastly, DOS, and thus Windows, had to use \ because they needed to be as different as possible from Unix (to avoid lawsuits)... and thus you end up with C:\DOS