Command
If you are changing to a directory elsewhere within the filesystem directory tree, provide the path to the directory with a leading /. If you are changing to a directory that is within your current directory, you can simply type cd and the name of the other directory. In other words, it moves you to a new place in the filesystem. The cd command changes your current directory. With less you can scroll forward and backward through the file using the Up and Down Arrow keys, the PgUp and PgDn keys, and the Home and End keys. You can pipe the output from cat through less to make the process more manageable. With files longer than the number of lines in your terminal window, the text will whip past too fast for you to read. bash_log_out file, type the following command while the home directory is your current working directory, as it is by default: cat. This is faster than opening the file in an editor, and there’s no chance you can accidentally alter the file. The cat command (short for “concatenate”) lists the contents of files to the terminal window. bash_aliases file in your home directory. To make your aliases always be available to you, add them to the. Type pf, a space, and the name of the process you are interested in: pf shutterĪliases defined on the command line will die with the terminal window.
If you wanted to discover the process ID (PID) of the shutter process-or to find out if shutter was even running-you could use the alias like this. The grep command looks for entries in the output from ps that match the command line parameter $1. This alias uses the ps command to list the running processes and then pipes them through the grep command. This is required if the command sequence has spaces in it. Note the use of quotation marks around the command sequence.
Here’s an alias called pf (for process find) that is just a little more complex.
Aliases can be much more intricate than that simple example.