If you wanted to move to the newdevelopment directory from anywhere on the file system, you could type: You would move to the root directory with the following command. Mac Terminal uses a UNIX/LINUX-based style of commands so paths are formed by putting the names of directories together with a / in between each directory name, with the root directory always being denoted as just the / by itself. This is because the absolute path always starts from the root directory which is defined as /. This path is relative to /Applications/newdevelopmentĪn easy way to tell the difference between an absolute path and a relative path is that an absolute path begins with a / and a relative one does not. Keep reading, and I will explain a bit further how to use it and give you some tips to make it a little easier to use.įrom our example above, an absolute path might beĪn example of a relative path would be if we are already sitting in the /Applications/newdevelopment directory.Īpp1/Logs (notice there is no / before the path specification) While this command can be very simple, there are some things to know and look out for. I have used command-line interfaces like Mac Terminal for much of that time and commands like cd are ingrained in my head so they come naturally to me. I’m Eric, I have been around computers for over 40 years and I have worked as a software engineer for over 20. It’s a simple two-letter command followed by the directory name or path (shown below) but things can get a little complicated. Don’t worry, once you begin using it on a regular basis, things like changing directories will become second nature to you, and typing them in will be a breeze.Ĭhanging directories is probably one of the most frequently used commands when working in a command-line environment such as Mac Terminal. ![]() If you are new to Mac Terminal and just learning some of the basic commands, it’s possible you may be feeling overwhelmed.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |