Ready to watch this entire course?
Become a member and get unlimited access to the entire skills library of over 4,900 courses, including more IT and personalized recommendations.Start Your Free Trial Now
- View Offline
- Moving around the file system
- Creating and reading files
- Copying, moving, renaming, and deleting files and directories
- Creating hard links and symbolic links
- Understanding user identity, file ownership, and sudo
- Setting file permissions with alpha and octal notation
- Changing the PATH variable
- Using the command history
- Directing input and output
- Configuring the Unix working environment
- Searching and replacing using grep and regular expressions
- Manipulating text with tr, sed, and cut
- Integrating with the Finder, Spotlight, and AppleScript
Skill Level Beginner
If you are a premium member of the lynda.com Training Library or if you're watching this tutorial on a disc, you'll have access to the Exercise Files that are used throughout this title. The Exercise Files for this title are arranged by chapter and by movie, and you can find the Exercise Files that correspond movie that you're watching by first looking for the chapter number and then the movie number. You'll want to copy the contents of that folder into your user directory or to another convenient location. It's always a good idea to make a copy so that you still have the original to refer back to if you make changes.
To do this on my Mac I open up a new window using Command+N, which by default opens in my user directory, and then I can simply Option+Drag over the folder contents from the Exercise Files to create a copy. Once you do that your files will be the same as mine at the start of that movie and you'd be able to follow right along with me from there. For some movies, the Exercise Files include one or more dot files. These filenames start with a period and are normally hidden from view by the Finder. So these files would be able to show up in the Exercise Files they've been renamed.
We removed the period and we added an _example to the end of the filename, to help make it clear that the file will not work as is. In order to work with these files you have two options. The first is that you can open the file in a text editor to view and copy its contents. But take note that you may not be able to double-click the file to open it like I did, because there is no file extension at the end, like .txt. In that case you can drag the file onto the application's icon where you can select it using the application's Open File menu option. The other choice is that you can copy and rename the file from the Unix command line.
You want to use the Copy command so that you can make sure you retain the original one and I recommend using the -i option to make sure that you don't accidentally overwrite an existing file. After that, to get the path to the file the shortcut is simply to drag the file into the Terminal and that will write the full path you need out and then you can put the location of where you want to put it. This case it will be in my user root directory, and I am going to name the file .bashrc, which is the name with a period in front of it, and removing at the end. Once you do that the file will be copied and you'll be ready to work right along with me.
You can also just use the Exercise Files as a reference to check your work as you go along. Now you won't need any special software installed. Everything you need is already included with Mac OS X. If you're on a monthly or annual subscriber to lynda.com you will not have the Exercise Files that accompany this tutorial. But you can follow along with me. Everything that's in the Exercise Files we will create during the tutorials. So as long as you continue to work right along with me your files will exactly mirror what's in the Exercise Files, and remember that you can pause the video and rewind if you need more time to copy something down.