I second the suggestion by Gunjo: the Linux Command Line is a good resource for learning. Moreover you may download the free PDF
to have it at hand when you're working off-line.
Regarding your practice with the command line, indeed the man pages are a valid resource (especially as a reminder of the long list of options available to some commands, like ls
). You have to pay more attention to those commands that act on files, like rm
(potentially very dangerous for obvious reasons), mv
and so on. A good practice would be to put an echo
in front of the command and review the actual command line before executing it, especially when you use wild cards. Example:
$ echo rm *.png
rm tides_error_2km.png tides_error.png
if I see the shell substitution
has been performed as expected and the command matches what I meant to achieve, then I can safely do:
Another good practice is to check where you are at any time before executing (potentially) dangerous commands and you have pwd
to print the path of the current working directory.
Finally, I suggest to carefully read all the error messages
you get. In the majority of the cases they reveal what the error is and may give you a clue to what is the right thing to do.