Now that we’ve covered the basics of navigating your filesystem from the command line, let’s look at some helpful commands that will make using it easier!
clear is used to clear your terminal, which is useful when it’s full of previous commands and outputs. It doesn’t change or undo your previous commands, it just clears them from the view. You can scroll upwards to see them at any time.
tab can be used to autocomplete your command. When you are typing the name of an existing file or directory, you can use tab to finish the rest of the name.
The up and down arrows (↑ and ↓) can be used to cycle through your previous commands. ↑ will take you up through your most recent commands, and ↓ will take you back through to the most recent one.
Experiment with the helper commands! Some things you could try are:
- When your working directory is home/ccuser/workspace/blog, type
cd 2and then use tab - it should autocomplete upto
cd 201. This is because both possible directories (2014 and 2015) start with
lsto see what contents are in your working directory. Then use
cdwith the first letter of one of the files or directories and use tab to autocomplete.
- Use the up and down arrows to cycle through your previous commands.
clearto clear your previous commands and output from the terminal.