Anonymous user
Open Source Comes to Campus/UMD/Laptop setup/OSX command line: Difference between revisions
Open Source Comes to Campus/UMD/Laptop setup/OSX command line (view source)
Revision as of 13:15, 25 February 2012
, 12 years agono edit summary
imported>Jesstess No edit summary |
imported>Jesstess No edit summary |
||
Line 77:
* An absolute path contains the full set of directories from the root of the file system up to your target file or directory. On OS X, an absolute path starts with <tt>/</tt>.
* You can <tt>cd</tt> to an absolute path from anywhere on the filesystem.
* This is an example absolute path: <tt>/
<b>Relative paths</b>
* A relative path is calculated relative to your "current working directory" -- the directory you are currently in at a command prompt, as displayed by <tt>pwd</tt>.
* This is an example relative path: <tt>projects</tt>. That path only has meaning given a current working directory. If your current working directory were <tt>/
===Tips===
* You can use Tab to auto-complete directory and file names. So from inside the root directory <tt>/</tt>, if you type <code>cd
* The command prompt maintains a command history. You can use the up arrow to cycle through old commands.
Line 95:
# After starting a new command line prompt, how would you get to the root directory?
# How do you check what files and directories are in your current working directory?
# If you are in directory <tt>/
# What are 2 ways to avoid typing out a full navigation command? (hint: one requires that you've run the command before)
# What is the difference between <tt>cd projects</tt> and <tt>cd /projects</tt>?
|