Question: Write the command that reads the file that has the name (text.txt) and shows only one page each time you hit space and it allows you to explore the file back and forward.
Indeed, traditionally more doesn't go backward. It's the first line of prose in the less(1) manpage: "Less is a program similar to more (1), but which allows backward movement in the file as well as forward movement."
Yeah, a handful of these tripped me up as well. I got:
Question: Write the command that you use to move into your home directory '~'
Your answer: cd
Correct answer: cd ~
The man pages specify that cd moves into the current user's $HOME directory if called without arguments, but I'm sure there's some mystic difference between cd $HOME and cd ~ in certain cases.
cd without an argument will change directory to $HOME if $HOME is set and the value is non-empty as defined in the standard linked above. That’s not to say that all Unix-like systems do or even try to implement everything of that standard, but it’s a good indicator pointing to that a lot or most of them probably do.
As for cd ~, tilde expansion is done by the shell, not by cd. Same goes with any other command that you type ~ as the leading part of a path and provide as argument. (Also, in bash, among others, cd is a builtin command.) The shell will substitute the ~ for the path of your home dir when ~ is alone or followed by a slash and anything else. (And you probably know also that ~example would refer to the home dir of a user named “example”.)
I think you will sooner run into a system with a shell that doesn’t do tilde expansion, than you will run into a Unix system where plain cd without an argument doesn’t bring you to your home dir.
Technically the chances of tilde not working are the same as cd behaving differently because they’re both shell builtins.
I’m guessing (though admittedly not checked) that both ~ and cd (without parameters) are defined in POSIX. In which case any edge case that doesn’t conform could reasonably be discounted with regards to the submission’s exercise.
Not sure if the site is meant to be strictly Linux/Unix or not, but on Windows, cd without any path just prints the current directory and doesn't do anything else. (Although "cd ~" produces the response "The system cannot find the path specified.")
Color support is nice, default colors seemed terrible (blue on grey wasn't readable). The keybinds didn't make sense. No vi keybinds is a no go. At least do not touch hjkl!
Your answer: more text.txt
Correct answer: less text.txt