Fedora中如何建立資料夾和建立檔案

2021-12-30 05:24:13 字數 364 閱讀 3849

fedora中如何建立資料夾和建立檔案

fedora中,建立檔案和資料夾的命令不同。

建立檔案使用的命令是touch,而建立資料夾的命令是mkdir。

下面舉例說明兩種命令如何使用:

1.touch命令

(1)在當前目錄下,建立乙個名稱為lyc的檔案

可以看出,已經在當前目錄下成功建立檔案lyc。

(2)在aaa資料夾(目錄)中,建立檔案lyc

2.mkdir命令

(1)在當前目錄下,建立乙個名稱為bbb的資料夾(目錄)

(2)在當前aaa資料夾下,建立乙個名稱為bbb的資料夾(目錄)

可以看出,已經成功在aaa資料夾(目錄)下建立bbb資料夾(目錄)。

linux c建立資料夾,並在資料夾中建立檔案

建立資料夾,在在檔案裡面建立檔案 乙個例項 include include include include int main char pathname 100 pathname 0 f pathname 1 l pathname 2 o pathname 3 w pathname 4 pathna...

建立資料夾

當某資料夾不存在時,建立資料夾 import os path dir file if not os.path.exists path dir os.makedirs path dir 同時建立資料夾有兩種函式,os.mkdir和os.makedirs,兩者的區別在於前者是一級一級建立檔案目錄,後者可...

如何 建立檔案或資料夾

此示例在計算機上建立乙個資料夾和乙個子資料夾,然後在該子資料夾中建立乙個新檔案並將一些資料寫入該檔案。class createfileorfolder static void main read data back from the file to prove that the previous c...