Start learning with our library of video tutorials taught by experts. Get started
Viewers: in countries Watching now:
Unix for Mac OS X Users unlocks the powerful capabilities of Unix that underlie Mac OS X, teaching how to use command-line syntax to perform common tasks such as file management, data entry, and text manipulation. The course teaches Unix from the ground up, starting with the basics of the command line and graduating to powerful, advanced tools like grep, sed, and xargs. The course shows how to enter commands in Terminal to create, move, copy, and delete files and folders; change file ownership and permissions; view and stop command and application processes; find and edit data within files; and use command-line shortcuts to speed up workflow. Exercise files accompany the course.
This movie may very well be the most valuable movie in this entire training title, even though it's very simple. The Unix manual pages are an invaluable resource for helping you figure out what you want to when you're working in Unix. In fact, I learned 80% of the Unix I know from the manual pages. These are going to be your best friend during your journey. The manual pages, often simply refer to as just the man pages, is called that because the command to get to them is just man, and the man followed by whatever we want to look up in the manual. man echo will give us the manual pages for the echo command.
Go ahead and hit that, you will see at the top BSD General Commands Manual. The name echo, what does it do? Write arguments to the standard output. Then we get a synopsis, then we get the description. You can see the option -n there, do not print the trailing new line character, and then at the bottom we get a colon. Now let's just know that there's more. We can see more. To see the next page, you can simply hit the Spacebar or you can use F and B to go forwards and back. F forward, B backwards. Q will exit for quit. Those are very common options in Unix.
So let's go ahead and hit the Spacebar. We get down to the end. It says END. Now we have to hit Q and now the manual pages are gone. We're right back where we were. They don't stay there and crowd up our view. They just disappear. If we need them again, we can call them again. So that's it. That's how we find out how all these commands work and what all the options available to them are. It's extremely helpful. That way you don't have to refer to back to my videos every time you have a question about something. You just ask Unix, "Hey Unix! I need to refresher on what the options are I can pass into this." You will use it all the time. man actually has its own manual page too. man man and there you are, you can see the different options that are available for the manual.
There is also an abbreviated version of that, man -h or man -help, and those will just give you a quick overview of what the options are that you can pass into to manual. The most interesting of these options is the k option and that says the k option is the same as apropos. What is apropos? Well, man apropos. Look it up, search the whatis database for strings. It searches a set database files containing short descriptions of system commands for keywords and displays the result on the standard output.
Let's try it. man -k and then let's put in banner. That was the command that we used earlier. "Oh look," it says, "oh banner, I found that." Print large banner on printer. Now apropos works the same way, apropos. We just don't pass in the -k. apropos already looks for the keywords, things that match banner. Now just to show you the difference there, if we take away the first if you notice that just make the apropos ban, it's going to look for the keyword ban, and it found three this time. Not just banner, but it had a couple of others. bandwidth.
That's where it found the word ban in this one and then down here abandon, it found ban there, so it pulled up three different possibilities and said "Maybe you mean one of these." So it could help us find the right command and find out what it does. Now when we looked at the manual pages for apropos, it said that it was looking in the whatis database. We also have the ability to say whatis banner, and it will tell us that exact same description. The one thing about whatis is it doesn't do keyword searching. Whatis ban comes up and says there is nothing there. So apropos or man with the -k for the keyword, look for the this keyword.
Those are the ways to find out things if you aren't sure what the name of something is, you can look and say, "Hmm! Is there anything related to video, is there anything related to print," and you can find everything that's related to print. Now that might be a long list with thousands of entries, but it still might help you to find what you were looking for. But the most important tool is going to be man, so that you can find out what things do. man ls will then come up and tell us that ls lists our directory contents and give us all the options that we can pass in. You can see there's a very long list of options here, so there's no way you could remember what all these are.
You might remember a few of the key ones, but you would want to refer to the manual pages to see the rest. So it is indispensable tool. Definitely if in doubt, try the manual pages first. man followed by whatever the command is.
Find answers to the most frequently asked questions about Unix for Mac OS X Users.
Here are the FAQs that matched your search "":
Sorry, there are no matches for your search ""—to search again, type in another word or phrase and click search.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.