what is a regular file on unix

假装没事ソ 提交于 2019-12-04 01:01:31

Non-regular files are devices, pipes, sockets... try [ -f /dev/tty0 ], for example. Symlinks are also non-regular, but they're resolved by test -f.

They're text or binary data, called 'regular files' to distinguish them from other types like directories, symbolic links, sockets etc.

Take a look at http://en.wikipedia.org/wiki/Unix_file_types

It is not a directory, device file, block device, FIFO or socket. If you do an ls -l. The ones which start with a "-" are the files. Actually what most people to refer as just a file.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!