In each set, an r stands for read, a w stands for write, and an x stands for execute. From the left, the first three represent the file permissions of the owner, the middle three represent the file permissions of the group and the rightmost three characters represent the permissions for others. The rest of the string is three sets of three characters. If the first character is a - the item is a file, if it is a d the item is a directory. When you list files with the -l (long format) option you’ll see a string of characters that look like -rwxrwxrwx The flags define who can read, write to or execute the file. The chmod command sets the file permissions flags on a file or folder.
To change into one of those other directories, you can use the. The parent directory has other directories in it, as well as the directory you’re currently in. You can type the following command to go up a directory: cd. to represent the parent of the current directory. Here’s another trick: You can use the double dot symbol. To quickly return to your home directory, use the ~ (tilde) character as the directory name. 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.