linux副檔名和類型

來源:互聯網
上載者:User

標籤:linux   類型   

windows是通過副檔名區分檔案類型的

Linux中副檔名根檔案類型沒有關係

為了容易區分和相容使用者使用windows的習慣,我們也會用副檔名來表示Linux中的檔案類型!

linux中一切皆檔案。檔案類型包含:普通檔案,目錄,字元裝置,塊裝置,符號連結等

[[email protected] ~]# ls -l

總用量 132

-rw-r--r--. 1 root root     2 11月  8 14:25 a.log

-rw-------. 1 root root  1587 10月 26 12:51 anaconda-ks.cfg

-rw-r--r--. 1 root root     2 11月  8 14:25 a.txt

drwxr-xr-x. 2 root root  4096 10月 27 23:23 data

l:連結檔案

-:普通檔案  刪除方式用rm命令

d:目錄檔案

查看檔案類型用:file命令

純文字檔案:內容可直接讀取,數字字母等

二進位檔案:lnux中的可執行檔,比如命令檔案,cat ls cp

資料格式檔案:具有特定格式的檔案


ls -F 和ls -p :目錄檔案後面加個/

字元裝置:

[[email protected] data]# ls -l /dev/tty

crw-rw-rw-. 1 root tty 5, 0 11月  8 09:34 /dev/tty

建立一個塊和字元裝置:mknod

套介面裝置:通常用於網路之間進行資料連線

[[email protected] data]# ls -l /dev/log 

srw-rw-rw-. 1 root root 0 11月  8 09:34 /dev/log

連結檔案:相當於windows下的捷徑

[[email protected] data]# ls -l /etc/init.d

lrwxrwxrwx. 1 root root 11 10月 26 12:35 /etc/init.d -> rc.d/init.d

ln -s 源檔案名稱 新檔案名稱

管道檔案:

[[email protected] ~]# find /var -type p|xargs ls -l

prw-------. 1 root    root    0 11月  8 09:34 /var/run/autofs.fifo-misc


linux下副檔名的作用:

  1. .tar .tar.gz .tgz .zip .tar.bz表示壓縮檔,建立命令一般為tar gzip unzip

  2. .sh表示指令檔

  3. .pl表示perl語言檔案 通過perl語言開發的程式

  4. .py表示python語言檔案,通過python語言開發的程式

  5. .html .htm .php .jsp .do表示網頁語言檔案

  6. .conf表示系統服務的設定檔

  7. .rpm表示rpm安裝包檔案

    營運開發語言:shell python perl php四個之一


本文出自 “linux營運分享” 部落格,請務必保留此出處http://liangey.blog.51cto.com/9097868/1574429

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.