lesson - 4 Linux目錄檔案管理

來源:互聯網
上載者:User

標籤:


內容概要:
1. 和目錄相關的幾個命令
mkdir 關注-p選項
rmdir 同樣也有一個-p選項
rm -r -f 兩個常用選項
cp -r 針對目錄, 有時我們使用/bin/cp
mv 重新命名或者移動, 有時我們使用/bin/mv, 當我們mv目錄時,注意若是目標目錄存在的情況下,那麼會把來源目錄移動到目標目錄裡

2. 和文本相關的命令
cat
tac
more
less 幾個快速鍵:j, k, g, G, ctrl+b, ctrl+f, 空格
head -n
tail -n -f

3. 檔案或目錄的屬性
屬主、屬組
類型 d, -, c, b, l, s
許可權 rwx
inode 索引節點

4. 更改許可權
chown 更改所屬主,所屬組
chmod 更改rwx許可權
umsk 指定預設許可權, 目錄755 檔案644, 目錄若沒有執行許可權,我們不能cd到這個目錄下,但是可以ls這個目錄
chattr -a -i +a +i 特殊許可權
lsattr -a -R
set_uid set_gid sticky_bit 特殊許可權

5. 搜檔案
which
whereis
locate updatedb yum install -y mlocate
find -type -name -mtime -atime -ctime
stat 命令可以查看三個time

6. linux下的連結檔案
ln
軟串連 硬串連

lesson - 4 Linux目錄檔案管理

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.