linux 图标文件格式,linux文件类型

linux文件类型

linux文件的类型

在Linux中只有一下7种文件类型

即使开发人员在Linux文件树中添加新内容也必须符合一下之一

1.普通文件(-表示,可用ls -l查看)

2.目录(d)[在Linux中,任何东西都被看成文件,外设备也看成文件,注意是任何东西]

3.字符设备文件(c)

4.块设备文件(b)

5.套接口文件(s)[如我们开启MySQL服务后,在/var/lib/mysql/下生成的mysql.sock文件,关闭MySQL服务后,这个文件就消失了]

6.管道(p)[管道在Linux/UNIX中式非常有用的东西,必须掌握哈]

7.符号链接文件(l)[有点儿像WIN下的快捷方式]

Linux中只有以上7中文件类型,没有其他的....

另外,我们用ls -al 可以查看当前目录下的所有文件,这是我们可以看到"."和".."这两个文件

其实"."就是代表当前目录

".."就是代表上级目录,因为Linux把任何东西都看成文件,所以就有"."和".."这两个文件了喂...

[root@alex ~]# ls -la

total 56

dr-xr-x---.  7 root root 4096 Oct 18 08:46 . 目录文件

dr-xr-xr-x. 18 root root 4096 Oct 16 12:59 ..

-rw-------   1 root root  353 Oct 20 05:30 .bash_history 普通文件

-rw-r--r--.  1 root root   18 Dec 29  2013 .bash_logout

-rw-r--r--.  1 root root  176 Dec 29  2013 .bash_profile

-rw-r--r--.  1 root root  176 Dec 29  2013 .bashrc

drwxr-xr-x   2 root root 4096 Oct 16 14:01 c

drwx------   3 root root 4096 Aug 17 07:47 .cache

-rw-r--r--.  1 root root  100 Dec 29  2013 .cshrc

drwxr-xr-x   2 root root 4096 Oct 18 08:46 m

drwxr-xr-x   2 root root 4096 Aug 17 07:48 .pip

-rw-r--r--   1 root root   64 Aug 17 07:48 .pydistutils.cfg

drwx------   2 root root 4096 Oct 21 02:08 .ssh

-rw-r--r--.  1 root root  129 Dec 29  2013 .tcshrc

[root@alex ~]# ls -l /dev

crw------- 1 root root     10, 235 Oct 16 12:59 autofs   字符串设备   鼠标键盘全部都是  c

lrwxrwxrwx 1 root root          13 Oct 16 20:59 fd -> /proc/self/fd   软连接

brw-rw---- 1 root disk    253,   0 Oct 16 12:59 vda       块设备

[root@alex ~]# ls -l /dev/logsock 文件  通信

srw-rw-rw- 1 root root 0 Oct 16 20:59 /dev/log

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值