What does MAC use to navigate the file system?
If you've been using a Mac for any length of time, you know that it'south more than just a pretty betoken-and-click, window-and-icon interface. Beneath the surface of the operating system is an entire earth that yous can access only from the control line. Terminal (in your /Applications/Utilities folder) is the default gateway to that command line on a Mac. With information technology, instead of pointing and clicking, you type your commands and your Mac does your bidding.
Why would you desire to exercise that? For almost all of your computing needs, the regular graphical user interface is enough. Only the command line can be handy when it comes to troubleshooting your Mac, to plough on "hidden" settings, and other avant-garde chores. It's a practiced idea for anyone who isn't an utter beginner to exist familiar with it.
If y'all aren't already familiar with your Mac's command-line interface. First up: How to navigate the file system from the command-line prompt.
The prompt
By default, when you open Concluding, the first affair you'll encounter is something like this:
Final login: Fri Jun 25 10:37:06 on ttys000
romansempire@Mac-Pro-8 ~ %
Here's what y'all're seeing:
- The first line shows the concluding fourth dimension you logged into your Mac via the command line; that'due south the current fourth dimension, when yous're using Terminal.
- The second line is the prompt, and while it tin can change from arrangement to system depending on configuration, by default it contains several bits of data:
- In the prompt above romansempire is the user name.
- Mac-Pro-8 is the name of the Mac (aforementioned every bit the Computer Proper noun in the Sharing pane of System Preferences).
- The ~ shows where you are in the file system of the Mac. ~ is a shortcut that means the current user's Home binder. (In the Finder, that's the folder with your user proper name and the house icon.)
- The % is a character that the shell (the default interface that Concluding uses) displays to indicate that it'due south prepare to have a command.
How to meet what's in a binder
When you lot first get to the command line, you lot're in your home folder. While y'all're there—or when you're in whatsoever folder (directory in Unix-speak)—you might want to know what'southward in it. To do that you use the ls (or list) command. Type ls and press the Return key, and you'll see the folders (and/or files) in the electric current directory.
IDG
The output of the manifestly ls command is pretty sparse; information technology shows you the names of files and folders contained in the current directory (including some familiar ones such every bit Movies, Music, Pictures, and then on). Fortunately, yous can add a number of optional switches to the ls command that let yous to see more than data. For example, type ls -l (that'south a lower-case L), then press Return. Y'all'll come across something like this:
IDG
Don't worry likewise much about what all that means right now—we're simply getting our feet moisture. The indicate is that ls can provide additional information about files and folders, depending on the options you specify. In this case, that additional information includes the name of the user who owns each item in the directory. (That buying is part of the Unix system's file-permissions regime.) The romansempire staff next to most of those items above means that each ane is owned past the user romansempire, who is in the group staff. The other understandable bit of information next to each file and folder is the date and time each ane was last modified.
One other handy choice: You can view invisible files—ones that the Finder doesn't ordinarily show yous—by typing ls -a . (These hidden files all accept dots (.) in front end of their names.)
IDG
How to access other folders/directories
When you're in the Finder and y'all desire to motility to another binder, y'all find that folder and double-click information technology. From the command line, you use the cd (or change directory) control instead. And then let's say you're in your Home folder and want to peek inside the Downloads folder. To practice that, y'all'd blazon cd Downloads . (Remember to always blazon a infinite after whatever command that has an additional argument, such as the proper name of a directory in the previous instance.) Once y'all've done that, ls volition show you lot the contents of your Downloads binder.
Here are a couple of quick tricks for moving effectually in your Mac's file arrangement.
- If you blazon
cdand printing the Render central—with no directory specified—you'll get dorsum to your Home folder. (Yous can also typecd ~to go there.) - If yous type
cd /, you'll go to the root level of your startup deejay. - If you type
cd ..(that's ii periods), yous'll become to the directory above the ane y'all're currently in. And then if you lot're in your home binder, and typecd .., y'all'll get to your Mac'south /Users folder. - And if you type
cd -(hyphen) yous'll become back to the directory you were in before the last time y'all issued thecdcontrol.
To learn more than Terminal commands, see our articles on how to re-create and move folders also every bit delete files and folders using the control line and get assistance when you need it from man pages.
Annotation: When you purchase something later clicking links in our articles, we may earn a small commission. Read our affiliate link policy for more than details.
Source: https://www.macworld.com/article/221277/command-line-navigating-files-folders-mac-terminal.html
0 Response to "What does MAC use to navigate the file system?"
Post a Comment