What is the difference in using a forward slash and backslash in navigating file systems. Also what is the difference between ./
and ../
?
Well, in most languages backslashes need to be escaped in string literals, slashes do not. Further backslashes only work on Windows, while slashes work pretty much everywhere.
On the other hand, when passing path names as arguments to Windows programs, using slashes might not work because many Windows programs use slashes to signify command line flags, so you need to use backslashes.
On .
vs. ..
: .
is the current directory, ..
is the parent directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With