歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux技術 >> linux常用命令之文件系統

linux常用命令之文件系統

日期:2017/3/3 12:09:09   编辑:Linux技術

df

df - report file system disk space usage 查看文件系統的使用清空

用法

df [-hi] [path]

選項

-h human readable ,以人類易讀的方式顯示size
-i inode 顯示inode,不顯示硬盤容量

demo


注意

df後面接path的話,會輸出這個path所在的文件系統的信息

du

du - show file space usage ,輸出文件的大小
默認情況下,輸出當前目錄和所有子目錄的大小

選項

-s display only a total for each argument,僅顯示當前目錄的總大小
-S exclude size of subdirectories ,排除子目錄的大小
-h human readable

demo


ln

ln - make links between files ,創建文件之間的連接
默認是硬連接

用法

ln [-sf] source destination

選項

-s symbolic links ,軟連接
-f force,暴力,不管destination有沒有存在,直接復制

stat

stat - display file or file system status,顯示文件或文件系統的狀態
可以用這個指令看inode信息
默認情況是顯示出文件的inode信息

用法

stat [-f] file

選項

-f file system,顯示該file所在的文件系統super inode信息

demo


不加選項,顯示文件的inode
加了選項,顯示文件所在磁盤的inode信息
原文:http://www.wewill.top/2016/06/03/linux%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4%E4%B9%8B%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F/
Copyright © Linux教程網 All Rights Reserved