3 ms·
>In MS-DOS, you can type a command like "cd.." to move up a level, and it will work fine. In Linux, it will not; you need to type "cd ..". The different is the
by fsckboy 1y ago
>In MS-DOS, you can type a command like "cd.." to move up a level, and it will work fine. In Linux, it will not; you need to type "cd ..". The different is the space in between. Similar examples abound; in MS-DOS, you can type "dir/p", without a space between the command and its switch. This is a big deal, even if it might not seem like it.
you can add those commands (as functions) to linux, but it would be a boneheaded thing to do.
cd.. () {
cd ..
}
and it does not work universally on DOS, only on builtins
- 3036e4 1y agoOne fun feature in DOS COMMAND.COM (I am not sure if this works in Windows shells as well?) is that you can type DIR.BAT instead of DIR *.BAT, for any file extension. Not sure how easy it would be to do that in most Linux shells? I can't think of a way to do it in bash, but maybe there is some place to hook in something like that?
- boie0025 1y agoWhen I first began experimenting with Linux my first frustration was that it "didn't support" cd.. my mind was blown when I mentioned it to a friend who promptly demonstrated that the use of a space between "cd" and ".." worked in both environments. I decided I should RTFM after that.
- M95D 1y agoI got so used to "cd..", that even now, after 10+ years of linux, I still sometimes type it wrong without a space.
- frizlab 1y agoInterestingly I have done that in my conf[1] (using an alias, which makes more sense IMHO). [1] https://github.com/Frizlab/frizlabs-conf/blob/b60de058612d29c975c2e79f2c4033d76c5a12e2/src/components/dotfiles/files/_.shrc#L53 https://github.com/Frizlab/frizlabs-conf/blob/b60de058612d29...