16.2. Navigating in Unix

. Navigating in Unix If you can't see any icons for your files and folders, how are you supposed to work with them? UP TO SPEED Pathnames 101 In many ways, browsing the contents of your hard drive using Terminal is just like doing so with the Finder | . Navigating in Unix If you can t see any icons for your files and folders how are you supposed to work with them UP TO SPEED Pathnames 101 In many ways browsing the contents of your hard drive using Terminal is just like doing so with the Finder. You start with a folder and move down into its subfolders or up into its parent folders. In this chapter you ll be asked to specify a certain file or folder in this tree of folders. But you can t see their icons from the command line. So how are you supposed to identify the file or folder you want By typing its pathname. The pathname is a string of folder names something like a map that takes you from the root level to the next nested folder to the next and so on. The root level is for learning-Unix purposes the equivalent of your main hard drive window. It s represented in Unix by a single slash. The phrase Users in other words means the Users folder in my hard drive window or in Unix terms the Users directory at the root level. One way to refer to the Documents folder in your own Home folder for example would be Users chris Documents if your name is Chris that is . You have no choice but to ask Unix to tell you what folder you re looking at using the pwd command what s in it using the ls command and what folder you want to switch to using the cd command as described in the following pages. . pwd Print Working Directory or Where am I Here s one of the most basic navigation commands pwd which stands for print working directory. The pwd command doesn t actually print anything on your printer. Instead the pwd command types out on the screen the path Unix thinks you re in the working directory . Try typing pwd and pressing Enter. On the next line Terminal may show you something like this U ser s chri s Mo vie s Terminal is revealing the working directory s path a list of folders-in-folders separated by slashes that specifies a folder s location on your hard drive. Users chris Movies pinpoints the Movies folder in .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
222    271    1    25-04-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.