In Windows, the backslash ("\") is used from Dos, while in DOS, another tradition is to use a slash ("/") to represent command line parameters. For example:
CD
% Systemdrive %Dir
/S/B shell32.dll
Since the DOS slashes are occupied, we have to find the closest one. That's it. In UNIX, we use minus signs ("-") and double minus signs ("--") to represent the command line parameters.
Using a slash to indicate that the command line parameters are compatible. This problem was originally originated from IBM. IBM contributed a large number of tools when it first joined DOS development, all of which use slashes to process command line parameters. This tradition originated from Dec/IBM. For example, VMS used a slash to process command line parameters. Its Directory separator is the dollar sign ("$ "). By the way, this tradition has been partially inherited.
In DOS and Windows systems, the Japanese version of Windows displays the backslash as "¥" on the screen, although it is actually a backslash.
Currently, the Windows kernel supports both slash and backslash when processing the path. Many times we see an error when using a slash because the applicationProgramReasons. For example, cmd.exe does not support the use of diagonal bars, while powershell.exe does. For this reason, powershell starts to use the minus sign as the start character of the command line parameter.
Reference: http://blogs.msdn.com/ B /larryosterman/archive/2005/06/24/432386.aspx