So far this series of articles have presented a simple and concise perspective about navigate in the shell, visualize content, manipulate files and folders, and edit files inline.
This article is about a list of helpful commands available in the shell that might make a diference and simplify your workflow.
$ file test_file
File determines the test_file file type. It operates three kinds of tests to determine the type. It takes several arguments:
$ type command names
Type is used to determine if a command is built-in or is an external binary file:
It accepts the following options:
$ type -a command
Shows also if command is an alias and the path:
$ type -t command
Shows a single word for the command type
$ type -p command
Shows the name and path of the file that will execute:
$ which command
Which shows the full path of a command passed as argument:
$ help command
Help displays information about builtin commands.
$ man command
Man in as interface to the system reference manuals
$ apropos keyword
Apropos is another way of using the system reference manuals. Instead of views a single manual, apropos searches the short description for instances of keyword and returns all that apply. Keyword can be a regular expression.
$ info command
Another way of consulting the system reference manuals with more detailed information.
$ whatis command
Another way of consulting the system reference manuals. whatis displays on-line command descriptions.
$ alias name=”value”
This command instructs the shell to replace the “name” with “value” whenever we input “name”:
An alias defined in the .xsession, .bashrc, .profile will be usable through the system.
To eliminate the alias run “unlias”:
History shows the shell last entered commands.
This command executes the previous entered command.
This command executes the command in the history 300th line.
This command prints the command in the history 300th line.
History can also be used with grep. In the next article I’ll talk about it.