Let's take a look at command line basics, displaying a calendar of the current month. At the command line, there is a simple command that you can use to display a calendar of the current month, CAL. Let's take a look at command line basics, displaying the current date and time. At the command line, there is a simple command that you can use to display the current date and time. The date command. Let's take a look at command line basics, PWD. PWD is one of the simple commands that you need to learn. PWD stands for print working directory. This command gives us the location where we're currently located in the directory structure. Let's take a look at the manual page. PWD prints the name of the current working directory. There are a couple of options which you usually won't need to use. When we run PWD currently we see that I'm in my home directory. We can explore other places in the file system and use PWD to identify where we are. Let's use the cd command to go somewhere else. Let's try a few more. You'll see that wherever I go I can use PWD to find out the location where I am. Let's take a look at command line basics, using exit to end a terminal session. When you are done at the command line it is good practice to explicitly terminate your bash terminal session. This is done using the command exit. After you execute this command your bash session ends. If you were connected to a remote server via SSH as I was here, executing the exit command also terminates your SSH session. Let's take a look at command line basics using up and down arrow keys to navigate the command history. Let's begin by running a few simple commands. We'll start by running a command to see the current date and time. Next we'll print a simple message and next let's display a calendar of the current month. When working at the command line it is likely that you may want to run a command again. Bash provides a simple mechanism for navigating the commands that you have used recently, the up arrow and the down arrow. Pressing the up arrow will instruct bash to recall the previous command from the list of recently used commands. Let's try pressing the up arrow. As you can see the most recently used command now appears. Let's try pressing the up arrow again. The next most recently used command which in this case was echo now appears. Let's try pressing the up arrow again. The next most recently used command which in this case was date now appears. Just as we can use the up arrow to navigate backwards in time through the command history we can also use the down arrow to navigate forwards in time through the command history. Let's try pressing the down arrow. Doing so takes us forward one command to the echo command. Let's try pressing the down arrow again. Doing so again takes us forward one command. This time to the cal command. And finally let's press the down arrow one more time. Doing so takes us back to an empty command line. This corresponds with where we were before we first pressed the up arrow. Let's take a look at command line basics using left and right arrow keys to navigate within the current command. Let's begin with a command that displays a simple message. After entering this command what can I do if I want to change what I just typed? One option would be to delete what I typed using the backspace key and then type something else. However there is a more efficient option. By using the left and right arrow keys I can navigate backwards and forwards within the command as I type. Let's take a look at command line basics. Maketer. Maketer is used to create directories. After using Maketer to create a directory we can use the ls command to verify that that directory was successfully created. Let's try again. This time let's ask Maketer to be verbose. By calling Maketer with the dash v flag, Maketer prints a message for each created directory. We can of course still use ls to verify that the directory was created. Maketer can also be used to create multiple directories at one time. If you attempt to create a directory and a directory with that name already exists Maketer will produce an error message. In the previous examples we created directories directly within the current working directory. It is also possible to use Maketer to create directories elsewhere. This command creates a subdirectory called edu inside the src directory. This behavior can be extremely useful. However the advice that if the parent directory does not exist Maketer will produce an error message and will fail to create the subdirectory. This command failed because the examples directory doesn't exist. There's a solution. Let's take a look at the manual for Maketer to find it. The dash p flag instructs Maketer to make parent directories as needed. The dash p flag can also be used so that Maketer doesn't complain if the directory already exists. Recall that we already created a directory called bin. As we saw earlier if we try to create a directory that already exists Maketer will normally fail. But by calling Maketer with the dash p flag Maketer will silently succeed. In all of the examples so far we've asked Maketer to create directories within the current working directory. We can alternatively call Maketer using absolute paths. Maketer is an essential Linux command that you will use frequently. You should practice using it to create directories in your current working directory and elsewhere. While you may never use the dash z or dash m flags you should learn to use the dash p flag. Let's take a look at command line basics. Using ls to list the contents of the current working directory. ls is one of the most commonly used commands. Let's take a look. If I run ls with no arguments it will display the contents of the current working directory. We can now see that this directory contains five other directories. Let's navigate to another directory and use ls to view its contents. We can now see that the current working directory canlm contains a number of files and directories. Now let's use cd to change to a different directory. Now if I run ls with no parameters it's going to print the contents of the current working directory which is slash user. In conclusion invoking ls with no parameters will display the contents of the current working directory. Let's take a look at command line basics using ls to view text files. When working at the command line it is likely that you will commonly want to view the contents of various files you were working with. There are a number of programs you can use to accomplish this goal. One of the most widely used programs for viewing text files is ls. Like many programs you will encounter the name ls is a play on words. ls was developed as a more fully featured replacement for an earlier text viewing application whose name is more. ls can be used to view the contents of text files. Notice that unlike on windows, on linux file extensions such as .md, .txt, .zip, and .py are not meaningful. Even though readme.md has an extension it is still a plain text file and can be opened by ls. ls can be navigated page up and page down using various key shortcuts including space to page forward and b to move backwards. To exit ls press q. ls has lots of options. One helpful option is the display of line numbers. This option can be enabled with the dash n flag. Notice that if necessary ls will wrap lines if the line is too wide to be viewed on the current display. Line 10 in this file begins here but continues through here. This line is marked as line 10 throughout. Let's take a look at some other files. Here is George Washington's inaugural address and here is Johnson's and here is Obama's. The text files don't have to be in English. ls is capable of displaying text in other languages. For example, here's a swatish list for russian. ls can also open more than one file at a time. When using ls to view multiple files the command colon n is used to navigate the next file and the command colon p is used to navigate to the previous file. ls is one of the most commonly used programs you will encounter when using the command line. It is well worth your while to learn how to use it and to learn some of its more commonly used shortcuts. Let's take a look at command line basics. Using ls to list the contents of a non-current directory using a relative path. Let's take a look. If I run ls with no arguments it will display the contents of the current working directory. ls also accepts an argument. When I provide an argument to ls it will list the contents of that directory rather than the current directory. So here we see that there are a number of files and directories within the canlm directory. If we want to see the contents of one of these sub directories one approach would be to use cd to navigate to that sub directory and then use ls to view its contents. However, there is a faster way. Let's go back to the home directory and try the faster way. Rather than calling cd and then calling ls we can directly call ls providing the directory as an argument. In the above invocation of ls we provided a relative path canlm slash include as an argument to ls. After doing so ls listed the contents of the specified directory. We can also call ls using other relative paths including those that make use of dot and dot dot. Recall that dot dot refers to the parent of the current working directory. In this case the parent of the current working directory is canlm. Let's try another. In this case dot dot refers to the parent of the current working directory canlm and dot dot slash util refers to the util directory that is within the canlm directory. Let's take a look at command line basics using ls to list the contents of a non-current directory using an absolute path. Let's take a look. If I run ls with no arguments it will display the contents of the current working directory. ls also accepts an argument. When I provide an argument to ls it will list the contents of that directory rather than the current directory. Here we see that there are a number of files and directories within the canlm directory. If we want to see the contents of one of these subdirectories one approach would be to use cd to navigate to that sub directory and then use ls to view its contents. However there is a faster way. Let's go back to the home directory and try the faster way. Rather than calling cd and then calling ls we can call ls directly providing the directory as an argument. In the above invocation of ls we provided an absolute path slash home slash lane s slash canlm slash include as an argument to ls. Let's take a look at command line basics identifying and understanding symbolic links. Let's take a look. So far everything looks normal. User bin python is a file. More specifically we can use this file to invoke the python interpreter. Let's look more closely at this file. In the above invocation of ls we used the dash l flag to direct ls to use the long listing format. Notice that in this long listing there is an arrow. The arrow means that user bin python is not a regular file. Instead it is a symbolic link that points to another file. In this case user bin python points to the file python 2.7. We can confirm that user bin python is a symbolic link by invoking the program file. File can be used to determine the type of a file. This confirms that user bin python is a symbolic link. Let's take a look at user bin python 2.7. We see now that user bin python 2.7 is an actual executable file. So when we call python the system redirects our call so that python 2.7 is called instead. Now let's look at a slightly more complex example. We see that user bin emacs is a symbolic link to etsy alternatives emacs. Okay that's a little strange. Normally executable files are located in user bin not in etsy. Let's take a look at etsy alternatives emacs. We see now that we have another symbolic link. Etsy alternatives emacs is actually a symbolic link to user bin emacs 24x. So when we run user bin emacs the system redirects our call twice. First to etsy alternatives emacs and then finally to user bin emacs 24x. In conclusion symbolic links like shortcuts in windows and aliases in the mac os provide a mechanism for referring to another file. Symbolic links can be easily identified by using ls with the dash l flag and also by using the file command. Let's take a look at command line basics using ls to view hidden files. If I run ls with no arguments it will display the contents of the current working directory. We can see now that this directory contains five other directories, baz, foo, homework, canlm, and zork. However this directory actually contains a number of other hidden files. By default ls ignores any file whose name begins with dot. We can force ls to display these otherwise hidden files by using the dash a flag. As you can see when we invoke ls with the dash a flag in the home directory a number of hidden files can be seen. Let's take a look at command line basics using ls with additional options. If I run ls with no arguments it will display the contents of the current working directory. We can now see that this directory contains five other directories, baz, foo, homework, canlm, and zork. There are a number of additional options we can use to configure ls. One commonly used option is the dash l flag. The dash l flag causes ls to use a long listing format. Using the long listing format shows us additional information for each file. This information includes the file type, file permissions, the owner, and group associated with the file, the file size, the modification date, and the file name. The file sizes reported by ls dash l aren't particularly readable. By using the dash h flag ls will report file sizes in a more human readable format. Notice that when we specify multiple flags we can either list each flag separately or list the flags together. The above two commands are equivalent. There are a number of other useful flags in ls which can be found by reading through the ls man page. Let's take a look at command line basics. Using rm to delete files and directories. Let's take a look. The rm command can be used to delete files. Let's use rm to delete the file license in the current directory. After using rm the specified file has been deleted. Note that by default rm does not prompt you for confirmation. It simply deletes the file. If you use the dash i flag, rm will prompt you for confirmation before it begins deleting files. Let's use rm to delete a file in the food directory. Because we specified the dash i flag, rm prompted us for confirmation before it deleted the file. Let's see what happens if I say no. rm did not delete the file. Let's try again and this time we'll say yes to the confirmation. We can also use the dash v flag to force rm to explain what is being done. Let's try removing another file, this time using the dash v flag. By invoking rm with the dash v flag rm printed a message confirming that the file was deleted. We can also invoke rm with an absolute path. Now let's try to use rm to delete the food directory. What just happened? We called rm providing foo as the argument for what to delete and rm failed to delete the directory. Let's look at the man page for rm to see if we can figure out what just happened. By default, rm does not remove directories. To force rm to remove a directory and any contents it might have, we can invoke rm with the dash r flag. In many cases, especially when you are new to the command line, it is advisable to use the dash i or dash capital i flag when invoking rm recursively. Here we'll use the dash capital i flag. We will also use the dash v flag so that rm will confirm what files it deletes. Let's take a look at command line basics using cd to navigate to a directory using a relative path. Let's take a look at where we are, the current working directory. Now let's use ls to view the contents of the current working directory. We can use the bash built in command cd to change directories. To use cd, we provide the name of the directory into which we wish to navigate. Let's use pwd to verify that we've changed directories. Notice that in the above invocation of cd, we only specified the name bas. We did not type slash home slash lane s slash bas. This style of referring to a directory by only part of its name shows the use of cd using a relative path. The absolute path in this case would be slash home slash lane s slash bas. The relative path that we used was simply bas. Because we were located in the directory slash home slash lane s at the time we invoked cd, the part of the path corresponding to the current directory can be omitted through the use of a relative path. There are two special relative path components dot and dot dot. Dot refers to the current working directory. Dot dot refers to the parent of the current working directory. Let's recall where we are. The current working directory bas is located within the directory lane s. We could refer to the parent by its absolute path slash home slash lane s, or we could refer to it as dot dot. Let's use cd and dot dot to navigate to the parent of the current working directory. Let's practice some more. What just happened? We told cd to navigate to dot. Dot is another name for the current working directory. Consequently, we stayed in the same current working directory. In other words, we didn't go anywhere. What just happened? We were in slash home slash lane s slash foo. We used dot dot twice from slash home slash lane s slash foo. Dot dot would refer to the parent directory slash home slash lane s. But we used the relative path dot dot slash dot dot. If dot dot is the parent, then dot dot slash dot dot is the parent of the parent. In this case, the parent is slash home slash lane s and its parent is slash home. So, invoking cd dot dot slash dot dot from home lane s foo takes us to home. Notice what we just did. We used a relative path lane s slash canlm to navigate from slash home to slash home slash lane s slash canlm. We could have called cd twice, but this way was faster. Let's go back and see the slower way. We used cd here to navigate one directory at a time. Just as we can use ls to look into subdirectories, we can also use cd to navigate directly into subdirectories. Let's take a look at command line concepts. Understanding complex relative paths using dot and dot dot. Now, let's take a look at one example of a relative path that uses both dot and dot dot multiple times. Now, let's go back and take a closer look at this complex relative path. We'll begin by visualizing the directory tree in which we're operating. The directory tree looks like this. For convenience in keeping track of subdirectories, I have color coded the subdirectories we'll be discussing. The current working directory is slash home slash lane s slash canlm slash util slash stream. Notice that I've color coded the names in this path to match the corresponding subdirectories in the directory tree. Now, let's look at our complex relative path. Again, notice that I've color coded the names in this relative path to match the corresponding subdirectories in the directory tree. Dot dot, which you see here in red, refers to the parent of the current working directory. In our case, the parent is the util directory, which is also drawn in red here in the tree. Double conversion is a sub directory of util. Thus, given that stream is the current working directory, dot dot slash double conversion refers to the sub directory colored in gold in the tree slash home slash lane s slash canlm slash util slash double conversion. Dot is another name for the current directory. This means that dot dot slash double conversion slash dot means exactly the same thing as dot dot slash double conversion. The parent of double conversion is util. Thus, dot dot slash double conversion slash dot slash dot dot refers to the red node in the tree whose absolute path is slash home slash lane ls lane s slash canlm slash util. The parent of util is canlm. So, dot dot slash double conversion slash dot slash dot dot slash dot dot refers to slash home slash lane s slash canlm, which we see colored orange in the tree. LM, which you see in blue, is a sub directory of canlm. So, dot dot slash double conversion slash dot slash dot dot slash dot dot slash LM refers to slash home slash lane s slash canlm slash lm. And because dot, which we see here in blue, refers to the current directory dot dot slash double conversion slash dot slash dot dot slash dot dot slash LM slash dot refers also to LM. Rappers is a sub directory of LM. So, home dot dot slash double conversion slash dot slash dot dot slash dot dot slash LM slash dot slash wrappers refers to slash home slash lane s slash canlm slash LM slash wrappers. Dot dot, which we see here in blue, refers to the parent of the current working directory. So, this path refers to LM. And finally, builder is a sub directory of LM. And so, dot dot slash double conversion slash dot slash dot dot slash dot dot slash LM slash dot slash wrappers slash dot dot slash builder refers to home lane s canlm LM builder. Let's take a look at command line concepts. Understanding complex relative paths using dot and dot dot. Now, let's take a look at one example of a relative path that uses both dot and dot dot multiple times. Note that the following example is intentionally complex, deliberately made convoluted to illustrate how dot and dot dot can be used within other paths. Maybe a while before you encounter an example that says complex in real life, but it is good to understand what's going on. Now, let's go back and unpack that messy path. Dot dot refers to the parent of the current working directory. In our case, the parent is the utl directory. Double conversion is a sub directory of utl. Its absolute path is slash home slash lane s slash canlm slash utl slash double conversion. Dot is another name for the current directory. That means dot dot slash double conversion slash dot means exactly the same thing as dot dot slash double conversion. The parent of double conversion is utl. The parent of utl is canlm. So dot dot slash double conversion slash dot slash dot dot slash dot dot refers to home lane s canlm. lm is a sub directory of canlm. So dot dot slash double conversion slash dot slash dot dot slash dot dot slash lm refers to home lane s canlm lm. And because dot dot refers to the current directory, dot dot slash double conversion slash dot slash dot dot slash dot dot slash dot dot slash lm slash dot is the same as dot dot slash double conversion slash dot slash dot dot slash dot dot slash lm. Also referring to home lane s canlm lm. Wrappers is a sub directory of lm. So dot dot slash double conversion slash dot slash dot dot slash dot dot slash lm slash dot slash wrappers refers to home lane s canlm lm wrappers. Dot dot refers to the parent of the current working directory. So dot dot slash double conversion slash dot slash dot dot slash dot dot slash lm slash dot slash wrappers slash dot dot refers to home lane s canlm lm. And finally, builder is a sub directory of lm. So dot dot slash double conversion slash dot slash dot dot slash dot dot slash lm slash dot slash wrappers slash dot dot slash builder refers to home lane s canlm lm builder. Let's take a look at command line basics using cd to navigate to a directory using an absolute path. Let's take a look at where we are the current working directory. Now let's use ls to view the contents of the current working directory. We can use the bash built in command cd to change directories. To use cd we provide the name of the directory into which we wish to navigate. Let's use pwd to verify that we have changed directories. Notice that in the above invocation of cd we specified the full path slash home slash lane s slash bas. This style of referring to a directory by its full name shows the use of cd using an absolute path. Let's navigate somewhere else. In the above command the absolute path that we used was slash user slash local. Notice that an absolute path always begins with a slash. The layout of the linux directory structure is a tree. There is a single unique root of the file system tree. The notation slash represents the root of the file system. All directories have slash as their ultimate ancestor. Every absolute path begins with slash. Every absolute path specifies a sequence of contains relations beginning with the current file or directory and ending at the root of the file system. Let's look at another absolute path. We used cd to navigate to slash user slash share slash man slash user slash share slash man is an absolute path. Let's decompose this absolute path to understand it better. Man is a directory. We can use ls to view its contents. The parent directory of man is share. In other words the share directory contains the man directory. Let's verify this by using ls to view the share directory. The share directory contains the man directory. The parent directory of share is user. In other words the user directory contains the share directory. Let's verify this by using ls to view the user directory. The user directory contains the share directory and finally the parent of user is root. In other words the root directory contains the user directory. Let's verify this by using ls to view the contents of the root directory. The root directory contains the user directory. Let's take a look at command line basics using cd without options to navigate to the home directory. Let's take a look at where we are the current working directory. We are currently located in the home directory. Each user has a unique home directory. The path of the home directory can also be observed by printing the value stored in the home environment variable. Now let's navigate to a different directory. Let's use pwd to verify that we have changed directories. Now let's call cd again. This time we're going to call cd without providing a directory path. What just happened? Normally when we call cd we provide a relative or absolute path to a directory and cd then takes us to that specified directory. In this case we didn't provide a directory. So where did we go? Let's use pwd and the documentation for cd to figure out what just happened. By running pwd we can see that cd took us to the home directory. Each user's home directory is different. My home directory is slash home slash lane s. We invoked cd without any options. Doing so took us to the home directory. Let's take a look at the documentation for cd to find out why. Recall that cd is a bash built-in command. Documentation for bash built-in commands can be accessed using the help command. The documentation states that cd is used to change the shell working directory. Specifically cd is used to change the current directory to dir. Normally dir is provided by the user. However the square brackets in the usage means that providing this value is optional. In other words users are allowed to call cd without providing a directory. When this happens cd falls back to a default value for dir. The default dir is the value of the home shell variable. As we saw earlier the home shell variable stores the value of the user's home directory. Thus calling cd without any options takes us to the home directory. Let's take a look at command line basics using mv to move files. The mv command can be used to move files. mv takes two mandatory arguments. When moving a single file the first argument is the path to the file you want to move. The second argument is the path where you want the file moved to. In the above invocation of mv I moved the license file from the KNLM directory. The result is a file in my current working directory called abc. Another way to invoke mv is by giving mv a destination directory. For example let's say we wanted to move the file abc from the current directory into the directory baz. To do so we call mv using abc as the source file and baz as the destination directory. As you can see after the above invocation of mv the baz directory now contains abc. Usually it is not necessary to supply any options to mv. However if you want confirmation of what mv is doing invoking mv with the dash v flag will explain what is being done. By calling mv with the dash v flag mv confirms that it moved the file baz slash abc to KNLM slash license. mv can also be used to move multiple files to a common destination directory. Let's use touch to create several empty files. Now let's use mv to move all four of these files into the foo directory. The dot dot dot notation here indicates that mv allows us to specify multiple source files. As you can see all four files have been moved to the foo directory. Let's take a look at command line basics using cd to navigate using tilde. Let's take a look at where we are the current working directory. We are currently located in the home directory. Each user has a unique home directory. The path of the home directory can also be observed by printing the value stored in the home environment variable. Let's look and see what other users have home directories on this system. Navigating to or referring to a user's home directory is so common there is a special shorthand syntax for doing so tilde. The notation tilde username refers to the home directory for username. For example let's try navigating to the home directory for the user brice2. We can use pwd to verify that we have successfully navigated to the home directory for the user brice2. Let's try again with another user. I can also use this notation to refer to my own home directory. My username on this system is laness so I can refer to my own home directory using tilde laness. It turns out that referring to your own home directory is even more common than referring to someone else's home directory. Consequently there's an even shorter shorthand notation for referring to your own home directory tilde. When used as a directory a bare tilde without an accompanying username refers to the user's own home directory. You can also use this notation to refer to files and directories within your home directory. Notice that in the above invocation of cd tilde slash kenlm refers to the kenlm directory that is in my home directory. In conclusion the notation tilde username can be used to refer to the home directory associated with the specified username for example and the notation tilde can be used to refer to your own home directory. Let's take a look at command line basics using lan to create symbolic links. The lan command when used with the dash s flag can be used to create symbolic links. Symbolic links like shortcuts and windows and aliases in the mac os provide a mechanism for referring to another file. In its first form lan takes two mandatory arguments. The first argument is the path to a file that already exists. The second argument is the path where you want the new symbolic link created. In the above invocation of lan I created a new symbolic link called abc that points to the license file in the kenlm directory. ABC is not a copy of license. It is a symbolic link to license. We can verify this by using the file command to ascertain the type of abc. We can also verify this by calling ls with the dash l flag. The long file format shows that abc is a link and that it points to kenlm slash license. Now let's take a look at the second form of invoking lan. In the second form we only provide the path to the file that already exists. When we invoke lan in this manner providing only a single file as an argument, lan creates a symbolic link to that file with the same name in the current working directory. The third form of invoking lan is more advanced and can involve some additional subtleties so we'll cover that in a separate video. Let's take a look at command line concepts using lan to create symbolic links in another directory. The lan command when used with the dash s flag can be used to create symbolic links. Symbolic links like shortcuts and windows and aliases in the mac os provide a mechanism for referring to another file. We're going to look at the third form of invoking lan. The first argument is the path to a file that already exists. The second argument is a directory in which you want the new symbolic link created. Something's not right here. The symbolic link is broken. Let's remove the broken link and try again. In the above invocation of lan we attempted to create a symbolic link in another directory. When we provided the first argument it was a relative link. This use of a relative link in the third form of lan is the cause of our broken link. There are a couple of possible solutions. The first solution is simply to use an absolute path instead of a relative path. Now let's remove the symbolic link and figure out how to make a symbolic link in another directory using a relative path. Let's try to figure out why this link is broken. Within the baz directory license is a symbolic link pointing to ken lm slash license. Ken lm slash license is a relative path. Within the baz directory what does the relative path ken lm slash license mean? Well it would mean that there should be a directory a subdirectory called ken lm within the current directory baz. And within that subdirectory there should be a file called license. There's the problem. Is there a ken lm directory inside baz? No there's not. We just ran ls from within baz and there is no ken lm subdirectory. The broken link is looking for something that doesn't exist. That's why it's broken. We can confirm this by using read link to determine the absolute path that the symbolic link is attempting to point to. This confirms that the symbolic link is looking for a file that doesn't exist. Slash home slash lanes slash baz slash ken lm slash license. So what would happen if the missing file were to be created? Let's find out. To do so let's create a directory called ken lm within the baz directory. Now let's use the touch command to create an empty file called license within our newly created ken lm directory. Finally let's see if our symbolic link is still broken. The symbolic link license in the baz directory is no longer broken. Why? Because the file it was looking for now exists. So our link is no longer broken but it's pointing to the wrong file. Specifically it's pointing to the empty file we just created. That's not what we want at all. Let's remove these dummy files and try again. In order to use the third form of ln to correctly create a link it's helpful to realize two things. First ln interprets this first argument as a string and second if that string represents a relative path the file system will interpret that relative path relative to the directory in which the symbolic link is to be created. Recall from above that our broken symbolic link was looking for a ken lm directory within the baz directory. So let's think about things relative to the baz directory. From within the baz directory what relative path can we use to refer to slash home slash lane s slash ken lm slash license. Ken lm and baz are both in the home directory. In other words they have a common parent. We can refer to the parent of the current working directory as dot dot. So from the baz directory dot dot slash ken lm refers to slash home slash lane s slash ken lm and dot dot ken slash ken lm slash license refers to the file that we want. Armed with that information let's try making that symbolic link again. It worked. We can use read link to confirm that the symbolic link is now pointing to the correct file. We have succeeded in creating a symbolic link in another directory using a relative path. To do so we had to think about the relative path from the perspective of the directory in which the link is being created. It turns out that we can ask ln to do this change of perspective for us. When invoked with the dash r flag ln will create the symbolic link relative to the link location. Let's remove the existing link and give this a try. By running ls dash l we can observe that when the dash r flag was passed to ln ln correctly translated the relative path we provided ken lm slash license into a relative path that is correct in the context of the baz directory dot dot slash ken lm slash license. Calling read link confirms that the symbolic link in the baz directory is indeed pointing to the correct file slash home slash lane s slash ken lm slash license. Let's take a look at command line concepts using file to determine a file's type. Let's take a look. The file command accepts a file name as an argument. The command attempts to determine the type of the specified file. Using file we observe that user local is a directory. Great. That's exactly what we would expect. Let's look at some more files and use the file command to determine their respective types. The above invocation of file tells us that mail q dot one dot gz is comprised of data that was compressed using gzip. Here we see that license is a plain text file encoded using ASCII. Let's take a look at command line basics using cp to copy a single file. The cp command can be used to copy files. cp takes two mandatory arguments. When copying a single file the first argument is the path to the file you want to copy. The second argument is the path where you want the file copied to. In the above invocation of cp I copied the license file from the ken lm directory. The resulting copy is a file in my current working directory called abc. abc is a copy of license. We can use the diff command to verify that the two files are identical. Another way to invoke cp is by giving cp a destination directory. For example, let's say we wanted to copy the file abc into the directory baz. To do so we can call cp using abc as the source file and baz as the destination directory. As you can see after the above invocation of cp the baz directory now contains a copy of abc command line basics using cp to copy a single directory. The cp command can be used to copy files and directories. Let's say we want to make a copy of the ken lm directory. The first thing we might try is a simple invocation of cp what just happened. We tried making a copy of the ken lm directory called wxyz. If we run ls we see that our attempts to copy the ken lm directory failed. By default cp will not copy directories. To get cp to copy a directory we must add an additional option when invoking cp. If cp is invoked with the dash r flag it will copy directories including their contents. As you can see after the above invocation of cp with dash r the wxyz directory now exists and is a copy of the ken lm directory. Let's take a look at command line basics using echo to print simple strings. Echo is typically used to display a single line of text. Here the message was hello world. Echo prints this message to standard output. Notice that the message was not printed until after the enter key was pressed. While it may not always be necessary to enclose the message within quotation marks doing so is good practice. Let's use echo to display another simple message. As you can see the message we gave to echo is printed to standard output. It is possible to redirect the standard output stream to a file or use a pipe to send it as input to another process. In this case in this case we aren't doing either of those things. As a result we see the default behavior where messages sent to standard output are displayed on the terminal. Let's use echo to display some more simple messages. Let's take a look at command line basics using echo to display multi-line messages. Echo is typically used to display a single line of text. However echo can be used to print messages that span multiple lines of text. Let's start by using echo to print a simple message consisting of a single line of text. Let's try again but this time we're going to make a mistake. Notice what happened. We typed the opening quotation mark then we type the message then hit the enter key. Instead of printing our message we see something that looks like a greater than sign. Notice that we forgot to type the closing quotation mark. Let's add the closing quotation mark then hit enter again. Notice what just happened. Our message was printed but in addition an extra blank line was printed. Do you see the extra blank line? It's there. Let's try another example. In our next example the second line will contain more of the message. Here it should be clear that echo printed a message that consisted of two lines of text. When entering a multi-line message in this manner we're not limited to just two lines. The contents of our message will continue until we enter a closing quotation mark. After we enter the closing quotation mark and then press the enter key the entire multi-line message is printed to standard output. Let's take a look at command line basics using echo to display messages with escape sequences. Echo is typically used to display plain text messages however echo can be used to print messages that include special characters. Let's start by using echo to print a message consisting of a single line of text. Now let's try again but this time we're going to include something new and to do so we're going to take a look at the documentation for echo. The documentation for most commands is found by accessing the command's manual pages using the command man but echo is special echo is a bash built-in command. The documentation for bash built-in commands is obtained using the command help. By reading the bash help page we can observe that echo is capable of reading a number of backslash escaped characters. A backslash escaped character is just a character that is immediately preceded by a backslash character. Of the backslash escape sequences you see here it's likely that you'll only ever need to use one or two of them. The two that we'll examine here are the escape sequences for new line backslash n and for horizontal tab backslash t. Now let's try printing our message again. However this time instead of placing a space between the two sentences we're going to try to place a tab character between the two sentences. Recall that the escape sequence for a horizontal tab character is backslash t. What just happened? The escape sequence backslash t represents a horizontal tab character. We wanted echo to replace backslash t with an actual tab character. Let's take another look at the help page for echo. In the above invocation of echo we did not use any options. Notice that echo has an option dash e that does exactly what we want. If echo is called with the dash e option then echo will replace the escape sequence with its corresponding literal character. Let's try again this time using the dash e flag. It looks like there's a space character between the sentences but it's actually a tab. To see the difference more clearly let's try again but this time let's add another tab. Now we can see a difference. Let's try again with three tabs. Compare that to the same thing but with three spaces between the sentences. Now let's try again using the escape sequence for a new line backslash n. I did backslash t again. Let's try again with backslash n. Now let's add another new line and now again with three new line characters. By using escape sequences we can use echo to print a multi-line message even while we enter the command using a single line. Let's take a look at command line basics grep. The grep command finds text patterns in files. It prints out all the lines containing a matching pattern. Grep can match very complex patterns with the use of regular expressions. Let's take a look at grep's man page. Grep searches the named input file or files or standard input if no file is named. Let's use grep to find all the files that have the word zip in the name in the directories bin and user bin. To do this we first use ls to list the files in those directories then pipe the result to grep to search for the pattern zip. A list of file names containing zip is displayed. Grep pattern matching is case sensitive by default. Let's try to list the file names in bin and user bin that contain the word zip in uppercase. We get zero matches. To allow grep to ignore case when matching the pattern we can use the dash i flag with grep. The dash i flag specifies that grep should ignore case distinctions. If instead of a list of lines that match the pattern we want a list of lines that do not match the pattern we can use the dash v flag with grep to invert the match. We now get a list of file names in bin and user bin that do not contain the word zip. To output the number of matches instead of the actual matching lines we can use the dash c option with grep. Here we observe that there were 19 items which matched the pattern zip. Let's take a look at command line basics head and tail. Head and tail are commands that print the first and last parts of a file respectively. By default head prints the first 10 lines of a file and tail prints the last 10 lines. Let's take a look at their man pages. By default head prints the first 10 lines of a file to standard output. This can be changed using the dash n flag to specify the number of lines instead of assuming the default of 10. Tail behaves very similarly. Let's create a text file and use head and tail to examine its first and last lines. We can observe that foo.txt now contains a sorted list of the files in user bin. We can use head to display the first 10 lines of the file. We can use tail to display the last 10 lines of the file. To view a different number of lines say the first or last five lines of a file we can use the dash n option with head and with tail. These are the first five lines of foo.txt and these are the last five lines of foo.txt. Head and tail can also be used in a pipeline. Let's list the last seven items of the contents of the directory user bin. To do this we will use ls to list the contents, sort to sort them, and pipe the output to tail with the appropriate option listing the last seven items in the directory user bin. Let's take a look at command line basics echo. Let's take a look at echo's man page. The command echo accepts zero or more strings provided by the user and prints those strings to standard output. If the standard output of echo has not been otherwise redirected then those strings will be displayed to the screen separated by spaces. As we can see echo printed the string hello. If we provide more than one string to echo it will print each string and will put a single space between each pair of strings. Here's the first string followed by a space followed by the next string. If we provide more than one space between each string echo ignores the extra spaces and only a single space is printed. If we want to print a string preserving all spacing and other formatting we can enclose the string in quotation marks. When we do this echo will treat everything within the quotation marks as a single string. Let's take a look at command line basics wild card expansion. Let's try to use echo to display a single line of text see that the line we typed is displayed just as we typed it. Extra white space in the arguments of echo will be removed in the output. Here we typed extra spaces but the output in those locations only included a single space. When there are special characters in the line of text we see something else. To check this let's cd to a different directory and look at the contents of that directory using ls. Now let's try to use echo with a wild card character as the argument. The star or asterisk here is treated as a wild card character. Notice echo did not display the character star itself. Instead it displayed a listing of the files in the current working directory. Notice that this output of echo is the same in terms of the files listed as that we saw with ls. This is because before the echo command is executed the shell itself has expanded the wild card character into a list of file names in the current working directory. It is very important to understand how the shell carries out expansion for different kinds of characters. Echo is a good way to observe the effects of different special characters and their respective expansions before we use these special characters with other commands. Let's take a look at command line basics. Path name expansion. Bash is capable of performing certain types of expansions. Let's try to use ls to see how path name expansion works. In this command the wild card character has been expanded. The result is a listing of all file names in the specified directory whose file names end in .h. Let's try another example. Here the wild card expanded again resulting in a list of all files in the user bin directory whose file names begin with the character's py. Let's take a look at command line basics. Tilda expansion. Tilda expansion is a special expansion involving the tilde character. When the tilde character is used at the beginning of a username it expands into the name of the home directory for that user. Let's try to use echo to see how tilde expansion works. Here we see an expansion resulting in the full path to this user's home directory. If no username is supplied after the tilde character the result expands into the home directory of the current user which in this case is lane s. We observe here that the tilde character has been expanded into the home directory of the current user. Let's take a look at command line basics. Arithmetic expansion. Arithmetic expansion allows the shell to perform calculations before passing the results to a command as arguments. Arithmetic expansion uses the dollar sign character and double parentheses around an arithmetic expression. Let's use echo to see how arithmetic expansion works. See that this arithmetic expression 7 plus 3 has been calculated with the result 10. Note that arithmetic expansion only supports integers or whole numbers. The expansion would result in an error if decimals are present in the expression. See that bash has displayed an error message for the decimal invalid arithmetic operator indicating that the decimal point caused the error. Arithmetic expansion supports addition, subtraction, multiplication, integer division, modulo or remainder, and exponentiation. Arithmetic expansion may also be used alongside text. Let's try to use echo to see how the integer division and modulo operators work. If the result of the division is not an integer integer division will cause the result to be truncated to the integer part and will not be rounded. So using integer division 7 divided by 2 is 3 with a remainder of 1. The 1 was calculated using the modulo operator. The 3 was calculated using integer division. Now let's use echo to observe how the exponentiation operator works. This calculation has raised 5 to the exponent of 2 or 5 squared which is 25. Inside the double parentheses of an arithmetic expression it is possible to nest another arithmetic expression. Here we have nested an arithmetic expression 1 plus 1 within a larger expression 5 to the power of 1 plus 1. Here the inner expression calculates 1 plus 1 resulting in a value of 2. The outer expression performs the exponentiation 5 to the power of 2 resulting in 25. We can also use single parentheses to group the order of operations without actually causing a second expansion of the arithmetic expression to occur. This will calculate the same result of 25 using only one arithmetic expansion instead of 2. Let's take a look at command line basics, brace expansion. Brace expansion creates multiple text strings from a pattern. The pattern takes the form of an unchanging preamble followed by a variable expansion component followed by an unchanging postscript. The varying part of the pattern is enclosed by a pair of curly braces. The constant part before the opening brace is called a preamble and the constant part trailing after the closing brace is a postscript. Let's try to use echo to see how brace expansion works. This pattern has expanded into three text strings. Each string has the same preamble at the beginning and the same postscript at the end. The middle part of each string varies and is present in the same order as specified in the pattern. Brahms, Beethoven, Brahms, Beethoven, Bach. If we had changed the order in the pattern, the order would be correspondingly different in the created strings. Both the preamble and the postscript are optional. Here we expand a pattern with a preamble but no postscript. Here we expand a pattern with a postscript but no preamble and finally we expand a pattern with no preamble and with no postscript. Now let's try to use brace expansion with a preamble that includes white space. Here, bash considers i, love and Brahms, Beethoven, Bach to be separate tokens. As a result, the brace expansion is performed but i, love is not considered a preamble to the brace expansion. To get around this problem, let's try enclosing i, love in quotes. This is slightly better. Now bash sees two tokens instead of three. The first token is the quoted string i, love and the second token is Brahms, Beethoven, Bach. But bash still in this case does not consider i, love to be a preamble to the brace expansion. We can fix this by placing the quoted string immediately adjacent to the brace expansion with no intervening spaces. Now in this case, bash sees only one token, the entire string where i, love is taken to be a preamble because it immediately precedes the opening brace with no intervening white space. Finally, let's add an additional space but place it inside the quoted preamble and also add a post script. I'm adding a space but placing it inside the quoted preamble and leaving no intervening space between the preamble and the start of the pattern inside the braces. Finally, I'm going to place a post script a single period. A brace expansion can contain a comma separated list of strings as we have just seen. It can also contain a range of integers or characters using the operator dot dot. Let's try to use echo to see how to specify a range in brace expansion. Notice that I am not placing a space between the preamble and the pattern to be expanded and underscore is fine but a space is not. This is expanded to five strings, number one, number two, number three, number four, number five. We can also use a sequence of characters with the dot dot operator here. The pattern has expanded to a sequence of lowercase letters. Integers within a brace expansion can be zero padded. Here we have zero padded numbers one through nine and here we have zero padded numbers 90 through 100. Brace expansions can also specify numbers in reverse order. Here we have something expanded to strings where the numerical part is in reverse order from five through one. Brace expansions can specify a range of characters as we have seen above and character ranges can also be reversed. We observe that this character range has expanded to lowercase characters in reverse order. Brace expansions can also be nested. Let's work through this expansion part by part. In the expansion the preamble lowercase a and the post script lowercase b are constant. In the variable part of the expression the brace expression is a list of items separated by comma. So bash starts with the first item a one two. This is a brace expansion as well. This expands to two strings uppercase a one and uppercase a two.  Now the first nested brace expansion is complete. Bash now starts with the second item b three four. The next two strings produced are the expansions b three which is then prepended with the preamble a and postpended with the suffix b followed by the expansion b four ultimately resulting in a b four b. Brace expansions are particularly useful for making lists of files or directories where the names are of a fixed format. For example imagine that we want to organize a sequence of photos by month and year. We may wish then to create a series of directories in numeric format in chronological order. Instead of creating the directories one by one using the command maker by hand we can use a command using brace expansion. Now using a single maker command we can create a series of directories. With this one command we have created directories for all of the months over a range of 10 years. Let's take a look at command line basics path name expansion. Bash is capable of performing certain types of expansions. Let's try to use ls to see how path name expansion works. In this command the wildcard character has been expanded. The result is a listing of all file names in the specified directory whose file names end in .h. Let's try another example. Here the wildcard expanded again resulting in a list of all files in the user bin directory whose file names begin with the characters py. Let's take a look at command line basics command substitution. Command substitution allows us to use the output of a command as an argument of another command. This is done by using the dollar sign character followed by a pair of single parentheses. The command whose output we want to use goes inside the parentheses. Let's begin by using ls to list the contents of the etsy x11 directory. Now let's enclose this ls command using the command substitution syntax. Here we have first executed the command ls to output a list of items in the etsy x11 directory. Command substitution then causes this output to be used as the arguments to echo. Echo finally displays a list of those items. Note that command substitution is very different from piping. Piping allows us to redirect the output of one command to the standard input of another command. For example a pipeline could be used to pipe the output from ls to the input of sort. If we were to reverse that pipeline in attempt to pipe the output of sort to the input of ls this wouldn't work and it would have no effect on ls because ls does not make use of standard input. On the other hand command substitution allows us to use the output of one command as the argument or arguments of another command. Therefore if we wish to configure the behavior of a command such as ls with the output of another command we would use command substitution not piping. Let's try to use command substitution to provide arguments to ls. In the outer command we are attempting to use ls with the dash l flag to create a long listing in this format. We're using the command which with an argument of cp to determine the full directory the full absolute path to the cp command. The result of which is ben cp. Ben cp is then substituted as the argument to ls dash l resulting in the output that we see here. There is also an older syntax for command substitution that we do not recommend that you use however you may occasionally see it. That older syntax uses back ticks instead of the dollar sign parentheses syntax. Again we do not recommend using this back tick syntax however it's important to be able to recognize it if you see it in someone else's scripts. Let's take a look at command line basics escaping characters. By default the dollar sign has special significance to the shell. Use of the dollar sign here tells bash that we want to refer to the variable called user. Bash then looks for a variable called user gets the contents of that variable and replaces user with the contents of the user variable. If we want to print a string containing an actual dollar sign we can precede the dollar sign with a backslash. The character we wish to quote in this case a dollar sign is then preceded with a backslash which prevents this particular dollar sign from being interpreted as a special character. If that dollar sign is followed by text then the quoting of the dollar sign prevents expansion by treating the dollar sign as an actual literal dollar sign rather than as a special character which in normal cases would indicate that expansion is to be done. This type of quoting is used to selectively suppress expansions. It is handy when we occasionally want a special character such as the dollar sign to appear as itself. Let's see the effect of this type of character escaping in commands. In this command there are two expansions that could take place. Here we have a variable that is expanded to the value of that variable here lane s. Secondly escaping transforms backslash dollar sign into the literal dollar sign character and prevents the prevents dollar five from being treated as a variable expansion. The dollar sign is a character with special significance to bash. There are other characters that also have special significance to bash. These include the dollar sign which we just discussed, the exclamation point, the ampersand, the backslash itself, and the space character which bash uses to delimit tokens. Any of these special characters can be escaped using a back slash. Since the backslash is itself a special character if we want a backslash character to appear as ordinary text we would also need to escape it with a preceding backslash character. Here the first backslash character escapes the second backslash character resulting in a literal backslash character. Because this second character was escaped it does not in turn escape the dollar sign and the dollar sign here normally acts as normal to cause a variable expansion. See that we get this backslash character in front of the username. Let's see an example using multiple other escaped characters. Here we have escaped a literal space, an ampersand, another literal space, and an exclamation point. The ampersand and exclamation point have special significance to bash and can be explored in other situations. Needless to say without this escaping we would not get this exact output. Another way that we can confirm that special treatment is occurring here is by using brace expansion. Recall from our discussion of brace expansion that normally brace expansion with a preamble needs the preamble to not be separated by a space. The reason is that a preamble is only considered if it is part of the same token as the token containing the braces. Here we're going to see that because we are using the backslash to escape the spaces this entire string is taken to be a single token by bash meaning that we will get greetings and salutations taken as the preamble to this brace expansion. We confirm this here, we get greetings and salutations Joe, greetings and salutations Jane. Let's take a look at command line basics. Double quoted strings. Many times when passing arguments to a command it is desirable for a string containing spaces to be treated by bash as a single token. As we previously discussed one mechanism for obtaining this behavior is to escape the relevant space characters using the backslash character. Here we have created a file with literal spaces in the file name. An alternative method to using escaped spaces is to use double quoted strings to enclose the entire file name. By first quoting the string myfirstfile.txt bash treats this entire string as a single token. Within double quotes some characters which normally have special significance to bash are treated as normal characters without special meaning. Normally the ampersand character has special meaning to bash inside the quotes that special meaning is lost. Wild card characters including the star, the tilde character, curly braces will all be treated as ordinary text and not special characters. Within double quotes therefore the following operations are suppressed. Word splitting, path name expansion, tilde expansion, and brace expansion. Let's observe the effects of double quotes in some commands. In this command the argument to echo includes extra spaces between two of the words. The output of echo does not have these extra spaces between the word a and the word test. This is because without double quotes space is interpreted as a special character for the purposes of performing word splitting and the extra spaces are simply ignored. If we put this argument in double quotes the spaces within the string are no longer interpreted as special characters. Rather the entire quoted string is treated as a single token for the purposes of word splitting. All of these spaces remain in the output as ordinary text. Let's try a command where double quotes will suppress expansions. We observe in these examples that when the tilde is used outside of double quotes the tilde expands to the full path name of the current user. We also observe that when the star wild card character is used outside quotes it is expanded here to bar and here to foo. However when the same string is enclosed within double quotes the tilde expansion and the wild card expansion are both suppressed. The tilde is treated simply as a tilde character. The star character is treated simply as a star character. Let's look at another example. Here we observe brace expansion in action. The preamble color followed by red or green or blue. Color red, color green, color blue. This is the result of the expansion. When we enclose this same string in double quotes the brace expansion does not take place and the curly braces are treated simply as literal curly brace characters. There are other special characters that retain their special meaning inside double quotes. These exceptions include the dollar sign character, curly braces when used with the dollar sign character, single parentheses when used with the dollar sign character, double parentheses when used with the dollar sign character, back ticks and the backslash character when used to escape these other special characters. This allows the following operations to be carried out within double quotes. Parameter expansion using the dollar sign, arithmetic expansion using the dollar sign in parentheses and command substitution. Let's try a command that is not affected by these double quotes. This command contains two examples of parameter substitution here using a dollar sign and curly braces and here using simply a dollar sign. The result of that expansion is observed here for this first case where the variable user is replaced with its value lane s which is the name of the current user and again the variable user is replaced with the value of that variable lane s. Here arithmetic expansion is performed. The dollar sign double parentheses indicates that arithmetic expansion will be performed. The arithmetic expression two plus two is replaced with the result of that arithmetic operation, the integer four and finally command substitution. The command cal is run and the output is substituted for this expression here. All of these operations expanded as expected despite being within double quotes. Parameter expansion gives us the value of the variable named user arithmetic expansion calculated the result of two plus two and command substitution has displayed the output of the command cal. Let's take a look at command line basics single quoted strings. Many times when passing arguments to a command it is desirable for a string containing spaces to be treated by bash as a single token. As we previously discussed one mechanism for obtaining this behavior is to escape the relevant space characters using the backslash character. Another alternative is to enclose the string within double quotes. A third alternative which we will discuss now is the use of single quotes. Just as when double quotes are used to enclose a string when a string is enclosed in single quotes that string will be treated by bash as a single token. Recall that when using double quoted strings word splitting, parameter expansion, tilde expansion and brace expansion are suppressed but parameter expansion, arithmetic expansion and command substitution are still performed. When a string is enclosed within single quotes none of these expansion operations are performed. Let's look at an example but first let's create a new directory containing a couple of empty text files. Now let's try a command involving tilde expansion, brace expansion, command substitution, arithmetic expansion and parameter expansion. Bash begins by tokenizing the argument line resulting in seven tokens which are passed as arguments to echo. The first argument is the plain text string hello comma. The second argument is the plain text string world. The third argument is the string tilde slash example slash star dot txt. This argument is expanded using tilde expansion and wildcard expansion into home lanus example a dot txt and home lanus example b dot txt. The fourth argument is three dot dot seven within curly braces. This is expanded using brace expansion into three four five six seven. The fifth argument is file etsy chron tab within dollar parentheses. This expands via command substitution into the result of performing the file command with the argument etsy chron tab resulting in etsy chron tab colon ascii text just as if we had typed it at the command line. The sixth argument is the arithmetic operation two plus two which is expanded using arithmetic expansion into the result four. The seventh argument is the variable user which is expanded using parameter expansion into lanus. The echo command prints each of these results separated by a single space character each. Now let's see what changes when we enclose this argument list within double quotes. First of all we can see that the literal space characters in the string are preserved. This is because the entire quoted string is treated by bash as a single token when the string is enclosed in double quotes tilde expansion is suppressed wildcard expansion is suppressed brace expansion is suppressed but command substitution still takes place arithmetic expansion still takes place and parameter expansion still takes place. Now let's see what happens when we enclose the argument within single quotes instead of double quotes again we first see that the literal space characters are again preserved this is because as before the entire quoted string is treated by bash as a single token when the string is enclosed in single quotes all forms of expansion are suppressed tilde expansion is suppressed wildcard expansion is suppressed brace expansion is suppressed command substitution is suppressed arithmetic expansion is suppressed and parameter expansion is suppressed instead we get the exact literal string that we typed in being returned by the echo command


It's not just the outdoor furniture that we're fixing here at the start of day two of the 2014 variety minibash attribute to Ewan Gilmore. There's all sorts of things going on out here at Morris Christian Camp. To be honest I've known Moulous for about 10 years and I didn't even know Christian had a camp. I've got nothing, nothing to say. It's not worth the time. There's so many projects going on here that one of the important ones is that we do need to crash test dummy but we're doing a bit of the adventure equipment so I'd like you to show you this new piece of equipment and we've got a dummy on there ready to go. Oh look at this. Lift your feet mate! Lift your feet! Here's the best part, here's the best part, here's the best part and oh yeah so did it work? I think that's been fixed extremely well. Yeah I think it's a good rap actually. And there we have it Morris Christian Camp busy beach bashes everywhere. Day two still continues. What a result. Oh yeah let's hope the rain stays away so we can...


Hello and welcome to my YouTube channel. My name is Sandy Olnok and happy Earth Day. Today I thought it would be fun to take you on a field trip and we are at Powswood Gardens and this is a place in my town where there's just a private garden and you can be a member here which I am because I just found this place and I'm going to be sketching here throughout the year.  Later on in this video I'm going to tell you about a new class that's part of a series of classes from Powswood Garden. Let's get started on the tour. 2023 is my year of sketching and to that end I have decided I'm going to start getting outside instead of just sketching at home and I've come up with a sketch kit for myself. It's all in that little packet that you just saw me take out of the car. It's so nice to be able to have wash, pen and ink and watercolor options at the ready. So I'm going to show you the kit in a little bit but I want to first dive into showing you around the garden. It has a whole bunch of different sections to it and each one has something that's just on the verge of blooming, lots of little buds so I can't wait to see how this is going to develop in time because I'm new to the garden. The one drawback is filming here because the audio is just kind of crazy loud with all these airplanes so I'm removing the background audio so you don't have to listen to that noise and just going to put some birds behind it that I find so you can at least enjoy some singsong-y happy birds. You'll notice as I'm filming I'm raising up the camera and then looking from down low I always try to see what's going to be the best angle for the sketch that I want to create. Do I want to make something that has all of the tulips or do I just want to do a close-up of some of them? And these sweet 16s were really pretty so I painted just those. Then I moved around to another garden down the pathway from the tulips and came upon the Mount Fuji cherry blossom trees and at the time that I filmed this one all of those buds were tiny. They were just very tight round buds and they were just waiting to open up. They were waiting for some nicer weather and I sketched them while they were very small buds and it didn't take long at all a few more days and they started to open up and this is the kind of progress I'm looking forward to seeing at the garden. It's so close to my house I can come over here for just an hour and pop in and sketch for a little bit. There's so much to sketch here. There's lots of things waiting to be drawn so I'm very excited about that. As I was doing these sketches and realizing I wanted to do a class because I want to get more of you out there sketching I want to take you to Palswood with me and so I have created a class. It's going to be a series of classes and this first one is early spring so we're going to take a look at some of the plants that have already bloomed or some of the greens that are a staple of the place and you'll learn about the plants themselves a very small amount. We'll have some footage of them so you can see them like this in real life then we will paint them with watercolor and then we'll use some pen and ink to refine that. Originally I was going to make this a higher level class but I realized I wanted to make sketching something more accessible to people who maybe haven't drawn before so this is called a level two class. Generally my recommendation is that people start out in a level one class to really get the foundations down about the medium and color theory etc but in this particular case sketching is kind of a gateway drug to art and if you can jump in here and learn just enough to be able to make some nice sketches in a sketchbook then that might wet your whistle so that then you might want to put more time into art and really get some learning done so you're always welcome to go back and take one of the jumpstart classes and get more on color theory and shading and all that kind of stuff so that you get more in-depth information but in this class I'll be talking about mixing colors because I'll be using just the primary colors red yellow and blue in a cool and in a warm so six paints for the most part will do you some very inexpensive sketchbooks you can use cheap brushes you can use real cheap supplies you don't even have to get the paints that I recommend I'm just hoping to get more people excited about art and get you interested in sketching because sketching outdoors is more fun than a barrel of monkeys because not only do you get out and get some fresh air and enjoy yourself but you also get to make something while you're outside and what could be better than that I can't think of much as I was going up and down the path in the woods out back I ran into so many families the little boys were throwing rocks in the creek and stomping in mud puddles all those things that kids love to do it's not dog friendly so don't bring your canines with you but do bring your children and have them have a blast out in nature for a little while there's membership fees and entry fees and stuff on their website you can buy those tickets ahead of time or pay when you get there if you're interested in coming out for an urban sketching adventure with me I'm hoping to get my local urban sketchers out I don't know in the next couple months maybe if I get my act together and host an event here I think that would be fun and if you want to be on that list just drop me a note from my website and I'll add you to an email whenever I get myself organized to do that I'm looking forward to it and yes I did say urban sketching urban sketching is not just drawing buildings like in my last video when I talked about drawing buildings it's about drawing from life and here you see me drawing ducks from life these ducks were floating on the pond and they did get scared away by some of those little boys running around I did just here on Thursday that some crows came and attacked the ducks and their nests so we will not have ducklings oh my gosh I'm so sad I was really hoping for ducklings alas here you can see me working on a larger sketchbook on my sketch easel that I'll introduce you to in a moment but this is what it looks like when it's on a tripod so I can stand and get a higher view versus being seated and sitting down lower in order to get whatever angle it is that I want for my sketch and just off to the left of the pond is this huge camellia bush and it was all the the flowers were hanging down with the weight of rain on them they were so beautiful and we will be painting one of those in class in pals with sketches and so if you're interested the link will be in the doobly doo but do not go yet do not go yet because we are going to sit by the waterfall at the upper edge of the pond right here with this lovely sound I found some sound that does not have airplanes flying overhead and we're just going to paint and sketch so I will show you the process that I go through as well as my supplies so this is my new sketch setup I've got two clamps on my sketch easel that I got from Etsy there will be links to in the doobly doo for everything and I keep a rag in the middle portion of that and I have a piece of tape with my list of things to pack so I don't forget anything the number of times I've gone out without a brush it's just kind of ridiculous and in the pocket of the stool is where my zipper pouch goes and I can attach a sketchbook onto the easel with the clamps I have a little bit of water usually I carry a bottle of water and I just share my bottle of water with my cup of water and then I've got my paints and I bring a spray bottle with me so I can wet the paints before starting them or if I need any water for a technique I'll have that on hand and then a pencil I use a lead holder you might want to use a mechanical pencil this is basically an expensive mechanical pencil but I like it because the lead will retract and won't break in the side of my bag a kneaded eraser and then I use two travel brushes and these get folded into their caps to make full-sized normal silver brushes and eight and a four and while I'm not a huge fan anymore of the silver brushes because I paint larger most of the time when I'm doing small work like this these brushes are just great so I'm going to keep them in the packet in my kit in the car because I always love having my supplies on hand anytime I decide to stop and paint or stop and sketch anywhere and these sketchbooks that I'm recommending for this class you can of course sketch any size you want but I'm recommending them because they're small and I'm enjoying having something small because it means I don't feel like I have a giant investment like it's going to take me an hour to paint this thing at a larger size I'd rather have a smaller area and paint something than saying I don't have an hour to give to that and then walking away because I don't have enough time to do a sketch that big so I recommend maybe try something small and see both of these sketchbooks there's a square and a rectangular and they are both they have decent paper for sketches like this they're not arches or anything but they work with watercolor quite nicely and I like them better than pentallic I like pentallic for pen and ink because it has a nice surface for that this does have a decent surface for pen and ink but I like the combination that it can handle of both watercolor and the pen and ink so I'm painting all the watercolor first if you haven't seen me do a wash and ink most of the time I do the watercolor first it gives me a chance to lightly sketch in all the elements without stressing out I do a very light very generalized pencil sketch but it allows me to decide what I'm going to put in here before putting down that pen and ink as soon as I start drawing with the pen and ink if I screw something up if my horizontal is not horizontal if I'm drawing a fence if my fence is crooked my fence is crooked because it's in pen and ink if I paint it then I have a chance to fix things when I get to the pen and ink stage so putting the watercolor down first really helps with that and then there's sometimes when I get done with the watercolor sketch and I'm like that's all I need I don't even need to add pen and ink and that's a good feeling when you actually have a watercolor that is enough for you without adding more to it but speaking of watercolors here's another little pitch for you I have put my flowers all my flower paintings on my website on sale all the florals through Mother's Day you can get a nice discount on them they're all on one page and I've linked that one page in the doobly-doo I will be adding more to it in the next week or two because I'm working on some other pieces and if you're interested in that if you have suggestions on the types of flowers that I should perhaps try then leave one in the comments down below it's not going to be a commission but if you have a suggestion for you know my mom loves a blobby blah and I would consider it if you you know made a blobby blah then maybe I'll do that maybe I'll add that to my repertoire so I'm adding in more details into the the scrub brush and stuff along the side of the the creek here and I asked if there was like a name for this creek I asked for names for all of the plants and everything and asked what I should call these different areas as I was doing the voiceovers and they said no that's just the pond so it's the waterfall above the pond there's two sides to the pond that you can walk along and lots of lots of different areas little tiny trails throughout different parts of the garden that are wonderful little spots that I found for sketching in a little teeny tiny out of the way area which apparently the kids are very good at finding because every time I went into one of those little spots there was always some kid that came and located me they're very smart little whipper snappers aren't they so I was just about getting closer to being done with this watercolor at this point and it was time to switch over and get out the pen and ink now when you're working outside managing your water and making sure it's dry enough that you can start working on the pen and ink part is a little bit important so I made sure that there were areas that I didn't touch for a while and I paid attention to what they were so that I could dive right into the pen and ink part and there will be some places where you'll end up touching your pen to some wet areas and you have to just be ready for that and say oh well oh well oh well it's just a sketch so don't panic but this was just a really fun one to doodle around all the watercolor areas to create rocks and dirt and plants but keeping them very loose I'm not trying to draw every single rock that is out here not trying to detail it in that kind of a way just getting a nice general sense of what this creek looks like today and of course in the urban sketching tradition one holds up the sketch in front of whatever it is that you were sketching so that is what I've done here so you can see the finished one and in the class you'll get to see this sketch narrated as well as another version of it so you'll see it twice thanks for joining me for this video if you're interested in taking the class and helping to support palswood gardens there's a link in the doobly-doo and there's some people coming so I should go now I'll see you guys later go out and create something every day


Hey, from Canada. Badge and I have done some investigating, some research regarding the vegetable system. So, if anybody has a 7-3 power stroke or a T444E international, I think we figured it out. Go all the way up here just to see my smiling face. That's not the case. Now, the thing about this bed of oil onto the power stroke thing is there's not a whole bunch of information out there. And there's a lot of questions that people don't ask, and of course me, I ask the questions. So what we're basically come up with is that we're going to run two electric pumps, unhook the stock system completely, plug the fuel pump hole and then run the fuel system through two waste veggie oil solenoids. Now the thing is that nobody can tell you how much oil is left in the head because these are dead heads. Now the Ford bleeds off the front and it returns off the front so it bleeds through, but the international don't. The international has this line coming up here to a pressure regulator right here. This sets your pressure at 35 psi. So now I'm going to show you something that nobody tells you. Here's the line coming in from the fuel tank. It comes through here through a strainer down this steel line to this side of the pump. This is a dual system pump. From this pump it goes to this line which comes back up here. Okay, it comes up through this line here and into the bowl, the fuel bowl. Now we're getting rid of this. From the fuel bowl, pressure's up the fuel bowl, comes back down here at 10 psi into the bottom of the high pressure pump down there. High pressure pump, it comes out there and it's set at 35-40 psi whatever. That's with this check valve here. This is your pressure regulator. So what this does in the international system is great because they're only thinking it's running on diesel. But when you put it to veggie it changes the whole bulging. So you have to tell the engine what you want. So we're going to tell it that we want it to run on veggie oil. So this system here comes up. The fuel line comes up from the high pressure pump here. Through this line, through here, down here into the head. The left front head, not the right, the right head comes right from the pump right to there. So anything over 35 psi is bled through here back to return line which is here. And by the way return line for those people who might not be familiar that goes right back to the tank. Like 90% of your fuel coming out of your engine returns to the fuel tank. So you just got to remember that. Because this is a mechanical pump with no regulation. So they regulate it with 35 psi. So when you're sitting there idling it's 35 psi. When you're sitting there going down the road at 160 miles an hour it's still 35 psi. So it just keeps pumping fuel. So it just comes up from the pump through here down the return line. And then it comes back through here in the same process all the time. Now the reason we're getting rid of this is this is a whole Nomad thing. So you know exactly what we're coming from. The filter here is around anywhere from $15 to $20. Now the filters we're going to be using are $6. So we can change the filters a lot easier. I think the last time I bought this thing it was like $27, $28, $29, $30 or something. So we're going to get rid of this system. And the problem with this system is for veggie oil like there's no problem with the system. Don't get me wrong. It's just saying that for using veggie oil it gives us more problems. It's one when it comes up into here there's a bleed hole right here. And that's how it bleeds the fuel filter out right. It comes back through here and bleeds down to return all the time right. So it's just a complete cycle and then when the engine needs fuel it'll take it. But this is how they vent the... So we're getting rid of this filter. And that by the way for anyone who's interested to see more information on this it's called a fuel-bold delete. If you search YouTube for it you basically get rid of all the stuff and then well Badge can explain the rest. So we're going to do a fuel-bold delete is basically what it is. Plus a high pressure pump delete. So what we're going to do is we're going to take this line off here take this line off here the return in the pump and we're going to take all this and chuck it in the garbage. We're going to come in here. I'm just explaining this to you so you can like my friend Sue Gerling she'll take a couple of days for it to sink in. Is we'll put this... I'm going to tell you how we're going to set it up and then you can think about it and then when we put it together you'll say oh yeah, tell me that. So what we're going to do is put a VO electric valve here which switches between diesel and waste oil or veggie oil, veggie, we'll call it veggie. And then up here we're going to do the same thing and this one here we're going to run it normal on default.  So that's why we're going default on the veggie oil and electric on diesel because we figure that maybe Jax will run maybe two to three minutes because I don't even think we're going to... we've seen one here in Drayton Valley that doesn't even... he don't switch back and forth he just runs it on veggie all the time starts it up so we're going to try it I think it'll work but we're going to try it this is a trial and error thing but anyway this is what we're going to do put a valve in here to control the fuel coming in and a valve here to return the return line now the reason for the one in the return line is because when you're running on veggie and you want to purge it you switch it to diesel puts diesel fuel into the engine and you purge the veggie oil back to the veggie tank not the diesel tank the veggie tank and for those people who don't know including myself just a short time ago purging means getting all the veggie oil out of the tank because when it sits and it gets cold it thickens and when the vegetable oil is thick it's really hard to start or impossible to start so that's basically what we're doing with the fuel system is we're going to take this all out we're going to plug this filter housing so there's nothing there because I still have a lot of questions one question is when we're running on veggie what's the pump doing? is it sitting there turning? is it chewing itself up? is what's it doing? nobody can tell me that so we'll get rid of it we're going to run two electric pumps and when we're on veggie it'll be you turn the switch on it turns the pump on when you're on diesel you turn the pump on because another problem with the international diesel if it runs out of fuel you got fun trying to get this thing primed so we're going to put a pump in there which I call a primer pump and if it runs out of diesel it's not going to be a big deal and by the way for people like me who are not mechanics that means when you run out of gas or diesel you get air in the system and you can't get the air out that's why there is a purge valve which we're going to put back in air valve right here so if you've got air bubbles in your system it's not going to start up so we're going to put them back in and for the first little while what we're going to do is we're going to tee this put a purge valve here and a gauge so that he'll be able to drive down the road and he wants 35 psi here at all times so he'll be able to look at that fuel gauge and see oh yeah I got 35 I got lots of fuel pressure or if he's going down the road and the fuel gauge drops off you'll say why and then he'll look and see if the pump quit or something like that just something because there's no sense putting all this stuff on the truck if he doesn't know how to use it or can't fix it it's just not worth it's not even worth the time so that's why we're putting a fuel gauge in here it'll tell them what the fuel pressure is going into the head which you want 35 psi and this one here we're going to get rid of the small one because that's a 10 pound this top part so we're going to replace that with a 35 pound pump almost we're going to put two veggie pumps on it basically what we're doing and two electric pumps and we're going to have two electric solenoids and it'll work like a top and then we're going to have one pressure regulator one pressure regulator which we're going to go because being a drag racer everything if you don't know how to modify get a drag racer to work on it and we're going to go to JB's automotive we're going to get a stomach regulator which goes on your gas or whatever and we're going to put it right here the fuel lines are going to come up and then the return line the veggie valve will be here it'll be preset at 35 psi here and then go over that it'll go back to the return line now the verbasto keeps up to 150 degrees it don't matter and it burns like maybe a half a gallon a day and very little wattage right so the second advantage to this is too is if Jack wants to go to cold weather and put in an extra heater he's got it the water here all he has to do is put the heater in which we have the heater too by the way well and so if the coolant is hot just for all the viewers so you understand this because I feel you because it's hard to follow along sometimes basically if we have the hot coolant running through there these heaters in the front right next to the driver those are just on a little switch and the only power it draws is a 12 volt fan because it's pushing through this hot this hot water through through the fan and then that will be a heater as well as what Baddwell is about to explain so this is the engine here and this is the heater system we'll show you that in a minute but the hot water for the engine comes out here into the heaters there's three heaters in there which is doing right now and then it comes out goes to the verbasto and by the way the verbasto is a coolant heater there's also an air heater but we have the coolant one it runs on diesel and then it comes out of there and it's going to go to the veggie tank and heat up the Arctic Fox we've got the tube that goes down into the tank to heat it up and then it comes back here and it goes back through fuel filter housing which warms it up and so we want the oil 150 degrees by the time it hits the engine so how we're going to accomplish that is with the verbasto and you've got the veggie tank here the pickup for the veggie tank the line we're going to put down this heater hose all the way to the engine wrap it in tin foil tin foil and pipe wrap which is insulation that's silver insulation a little bit of insulation so I can almost guarantee you that from the tank to the engine it don't matter if it's 90 below with the verbasto running that oil will be 150 degrees when it gets here almost guarantee it so that's the root of it now right here you're going to say well in the summer that's going to be crazy because it doesn't have air conditioning so we've got to keep it cool we're going to put basically what we're going to put in here is a hot water tank bypass system on an RV this is basically what it is you turn the tap off turn the tap off open the bypass so in the summertime go to the engine through the bypass through the verbasto through the tank and back to the engine it doesn't go through the heaters so the heaters will be cold so that's what we're doing with that there and it's not really a whole bunch of work but I think it's better for him because we had that on Danny but he didn't know he had it on Danny so the only thing we didn't have on Danny was the bypass so we're going to put the bypass in so I'll take you up front and I'll show you how that's going to work okay now the reason we're showing you this is that it all sinks in because this is a lot of information I spent five, six nights thinking about all this crazy crap but anyway this is the water coming out of the engine goes into the heater system right and this is a stepper pump that goes to the back but we don't need that anymore so this is the heater hose here that comes the heat comes up through here through the heater through the other heater it comes back in a stepper pump here which pushes it through the other heaters right so these are the two taps I showed you we're going to take these taps and move them back here a little bit and then we're going to put a bypass in here so basically what it'll do is we'll turn the tops off and we'll turn the bypass because this one here will this one will connect it up to this one and this one here will be connected up to the hose that runs to the back and then they'll come up and come back into this one into the engine so we're going to move this tap up on this hose and put the bypass in and it'll come through here through the bypass into the heater hose back to the back and come back up so this is how we're cutting out this hose it's all basically there we just have to put a couple another tap in it basically and run some heater hoses about this is one inch we've got a whole bunch of one inch so we're going to try to keep this one inch stuff for this area and then we'll go to three quarter, five eighths for the rest of it because you don't need that big volume of water but for the heater see if he ever wants to turn the heater on if it's nice and hot then he'll have the volume too because the bypass will keep pushing it through right so that's what we're doing for that one