日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 >

linux 文件浏览器_浏览Linux文件系统

發(fā)布時(shí)間:2025/3/11 40 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux 文件浏览器_浏览Linux文件系统 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

linux 文件瀏覽器

你為什么要學(xué)習(xí)? (Why would you want to learn?)

Linux is probably the most used operating system when it comes to development. For a developer, Linux provides all the required tools. Learning how to navigate the Linux file system can really benefit if you plan on using Linux as your primary operating system or for development purpose. The Linux command line is a very powerful tool that makes it easy and fast to access files on the system.

在開發(fā)方面,Linux可能是最常用的操作系統(tǒng)。 對(duì)于開發(fā)人員,Linux提供了所有必需的工具。 如果計(jì)劃將Linux用作主要操作系統(tǒng)或用于開發(fā)目的,那么學(xué)習(xí)如何導(dǎo)航Linux文件系統(tǒng)將真正受益。 Linux命令行是一個(gè)非常強(qiáng)大的工具,可以輕松快速地訪問系統(tǒng)上的文件。

Linux文件系統(tǒng) (The Linux File System)

Linux organizes its files in a hierarchical directory structure. The files are organized in a tree-like manner. The directories may contain files and other directories. The first directory in the Linux file system is the root directory (named as a /). The root directory is the parent of all other directories in the file system. It contains files and sub-directories, which contain more files and sub-directories and so on.

Linux以分層目錄結(jié)構(gòu)組織其文件。 這些文件以樹狀方式組織。 這些目錄可能包含文件和其他目錄。 Linux文件系統(tǒng)中的第一個(gè)目錄是根目錄 (名為/ )。 根目錄是文件系統(tǒng)中所有其他目錄的父目錄。 它包含文件和子目錄,其中包含更多文件和子目錄,依此類推。

Fig. 1: The contents of Root Directory.

圖1:根目錄的內(nèi)容。

基本命令 (Basic Commands)

1) pwd: print the name of the current working directory on the terminal

1)pwd:在終端上打印當(dāng)前工作目錄的名稱

To check which directory we are currently working in, we can use the "pwd" command. This command prints the absolute path of the current/working directory.

要檢查我們當(dāng)前在哪個(gè)目錄中,可以使用“ pwd”命令 。 此命令顯示當(dāng)前/工作目錄的絕對(duì)路徑。

When we log in to the system, our current working directory is set to our home directory. Each user is assigned its own home directory where he writes his files.

當(dāng)我們登錄到系統(tǒng)時(shí),我們當(dāng)前的工作目錄被設(shè)置為我們的主目錄 。 每個(gè)用戶都被分配有自己的主目錄,他在其中寫入文件。

2) ls: list the contents of the current working directory

2)ls:列出當(dāng)前工作目錄的內(nèi)容

To see what files we have in the current working directory we can use the "ls" command.

要查看當(dāng)前工作目錄中有哪些文件,可以使用“ ls”命令 。

3) cd: change directory

3)cd:更改目錄

To change our current working directory we use "cd" command. To change the current working directory type "cd" followed by the pathname of the new directory to which you want to go. A pathname is a route that we take to reach a particular directory. Pathnames can be specified in two ways:

要更改當(dāng)前的工作目錄,請(qǐng)使用“ cd”命令 。 要更改當(dāng)前的工作目錄,請(qǐng)鍵入“ cd”,后跟要轉(zhuǎn)到的新目錄的路徑名。 路徑名是我們到達(dá)特定目錄所采用的路由。 可以通過兩種方式指定路徑名 :

Absolute Pathnames

絕對(duì)路徑名

An absolute pathname begins with the root directory and follows the tree structure until the path to the desired directory is reached. For example, if I want to reach the directory bin in the usr directory which is a part of the root directory, the absolute pathname would be "/usr/bin".

絕對(duì)路徑名從根目錄開始,并遵循樹結(jié)構(gòu),直到到達(dá)所需目錄的路徑為止。 例如,如果我想到達(dá)usr目錄(它是根目錄的一部分)中的目錄bin ,則絕對(duì)路徑名為“ / usr / bin” 。

Relative Pathnames

相對(duì)路徑名

Unlike absolute pathnames which start from the root directory, Relative pathnames start from the working directory. Linux uses two particular symbols to represent the current directory and its parent directory in the file system. These are the "." and ".." symbols.

與絕對(duì)路徑名從根目錄開始不同,相對(duì)路徑名從工作目錄開始。 Linux使用兩個(gè)特殊的符號(hào)表示文件系統(tǒng)中的當(dāng)前目錄及其父目錄。 這些是“。” 和“ ..”符號(hào)。

The "." symbol refers to the working directory and the ".." symbol refers to the parent directory of the working directory. Let's see this.

“。” 符號(hào)是工作目錄, “ ..”符號(hào)是工作目錄的父目錄。 讓我們看看這個(gè)。

pwd : /usr/bin

密碼:/ usr / bin

Let's change our working directory i.e., /usr/bin to its parent directory which is /usr. We can do this as:

讓我們將工作目錄(即/ usr / bin)更改為其父目錄/ usr 。 我們可以這樣做:

(a) Using absolute pathname

(a)使用絕對(duì)路徑名

(b) Using relative pathname

(b)使用相對(duì)路徑名

主目錄的快捷方式 (A shortcut to home directory)

The "~" symbol represents the home directory of the user. So we can use this symbol to directly go to the home directory or list its contents with ls.

“?”符號(hào)代表用戶的主目錄。 因此,我們可以使用該符號(hào)直接轉(zhuǎn)到主目錄或使用ls列出其內(nèi)容。

Summing Up

加起來

In this article we saw how shell treats the Linux File System. We also learned about absolute and relative pathnames and the basic commands that are used move about the file system.

在本文中,我們了解了shell如何處理Linux文件系統(tǒng) 。 我們還了解了絕對(duì)路徑名和相對(duì)路徑名以及在文件系統(tǒng)中使用的基本命令 。

翻譯自: https://www.includehelp.com/linux/navigating-linux-file-system.aspx

linux 文件瀏覽器

總結(jié)

以上是生活随笔為你收集整理的linux 文件浏览器_浏览Linux文件系统的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。