{"id":135739,"date":"2019-02-14T09:03:53","date_gmt":"2019-02-14T01:03:53","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=135739"},"modified":"2019-02-24T22:32:31","modified_gmt":"2019-02-24T14:32:31","slug":"files-tehre-fangfa","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/files-tehre-fangfa.html","title":{"rendered":"Linux\u4e2d\u67e5\u770b\u6587\u4ef6\u662f\u4ec0\u4e48\u7c7b\u578b\u7684\u4e09\u79cd\u529e\u6cd5"},"content":{"rendered":"
linux\u4e0b\u6709\u4e03\u79cd\u6587\u4ef6\u7c7b\u578b<\/strong><\/div>\n
\u666e\u901a\u6587\u4ef6\u7c7b\u578b
\nLinux\u4e2d\u6700\u591a\u7684\u4e00\u79cd\u6587\u4ef6\u7c7b\u578b, \u5305\u62ec \u7eaf\u6587\u672c\u6587\u4ef6(ASCII)\uff1b\u4e8c\u8fdb\u5236\u6587\u4ef6(binary)\uff1b\u6570\u636e\u683c\u5f0f\u7684\u6587\u4ef6(data);\u5404\u79cd\u538b\u7f29\u6587\u4ef6.\u7b2c\u4e00\u4e2a\u5c5e\u6027\u4e3a [-]
\n\u76ee\u5f55\u6587\u4ef6
\n\u5c31\u662f\u76ee\u5f55\uff0c \u80fd\u7528 # cd \u547d\u4ee4\u8fdb\u5165\u7684\u3002\u7b2c\u4e00\u4e2a\u5c5e\u6027\u4e3a [d]\uff0c\u4f8b\u5982 [drwxrwxrwx]
\n\u5757\u8bbe\u5907\u6587\u4ef6
\n\u5757\u8bbe\u5907\u6587\u4ef6 \uff1a \u5c31\u662f\u5b58\u50a8\u6570\u636e\u4ee5\u4f9b\u7cfb\u7edf\u5b58\u53d6\u7684\u63a5\u53e3\u8bbe\u5907\uff0c\u7b80\u5355\u800c\u8a00\u5c31\u662f\u786c\u76d8\u3002\u4f8b\u5982\u4e00\u53f7\u786c\u76d8\u7684\u4ee3\u7801\u662f \/dev\/hda1\u7b49\u6587\u4ef6\u3002\u7b2c\u4e00\u4e2a\u5c5e\u6027\u4e3a [b]
\n\u5b57\u7b26\u8bbe\u5907
\n\u5b57\u7b26\u8bbe\u5907\u6587\u4ef6\uff1a\u5373\u4e32\u884c\u7aef\u53e3\u7684\u63a5\u53e3\u8bbe\u5907\uff0c\u4f8b\u5982\u952e\u76d8\u3001\u9f20\u6807\u7b49\u7b49\u3002\u7b2c\u4e00\u4e2a\u5c5e\u6027\u4e3a [c]
\n\u5957\u63a5\u5b57\u6587\u4ef6
\n\u8fd9\u7c7b\u6587\u4ef6\u901a\u5e38\u7528\u5728\u7f51\u7edc\u6570\u636e\u8fde\u63a5\u3002\u53ef\u4ee5\u542f\u52a8\u4e00\u4e2a\u7a0b\u5e8f\u6765\u76d1\u542c\u5ba2\u6237\u7aef\u7684\u8981\u6c42\uff0c\u5ba2\u6237\u7aef\u5c31\u53ef\u4ee5\u901a\u8fc7\u5957\u63a5\u5b57\u6765\u8fdb\u884c\u6570\u636e\u901a\u4fe1\u3002\u7b2c\u4e00\u4e2a\u5c5e\u6027\u4e3a [s]\uff0c\u6700\u5e38\u5728 \/var\/run\u76ee\u5f55\u4e2d\u770b\u5230\u8fd9\u79cd\u6587\u4ef6\u7c7b\u578b
\n\u7ba1\u9053\u6587\u4ef6
\nFIFO\u4e5f\u662f\u4e00\u79cd\u7279\u6b8a\u7684\u6587\u4ef6\u7c7b\u578b\uff0c\u5b83\u4e3b\u8981\u7684\u76ee\u7684\u662f\uff0c\u89e3\u51b3\u591a\u4e2a\u7a0b\u5e8f\u540c\u65f6\u5b58\u53d6\u4e00\u4e2a\u6587\u4ef6\u6240\u9020\u6210\u7684\u9519\u8bef\u3002FIFO\u662ffirst-in-first-out(\u5148\u8fdb\u5148\u51fa)\u7684\u7f29\u5199\u3002\u7b2c\u4e00\u4e2a\u5c5e\u6027\u4e3a [p]
\n\u94fe\u63a5\u6587\u4ef6
\n\u7c7b\u4f3cWindows\u4e0b\u9762\u7684\u5feb\u6377\u65b9\u5f0f\u3002\u7b2c\u4e00\u4e2a\u5c5e\u6027\u4e3a [l]\uff0c\u4f8b\u5982 [lrwxrwxrwx]<\/div>\n
<\/div>\n
\u67e5\u770b\u6587\u4ef6\u7c7b\u578b\u7684\u4e09\u79cd\u529e\u6cd5<\/strong><\/div>\n
1 \u00a0ls<\/strong><\/span><\/div>\n
ls -l \u00a0\u6216\u8005 ll (ls -l \u522b\u540d)<\/div>\n
# ll anaconda-ks.cfg ? ? ? ? ? ? ? ? ? ? ? \/\/\u770b\u7b2c\u4e00\u4e2a\u5b57\u7b26\r\n-rw-------. 1 root root 2460 6\u6708 ? 1 23:37 anaconda-ks.cfg\r\n<\/pre>\n
2 \u00a0file \u547d\u4ee4<\/strong><\/span><\/div>\n
[root@xiaochen ~]# file anaconda-ks.cfg\r\nanaconda-ks.cfg: ASCII English text\r\n<\/pre>\n
3 \u00a0stat \u547d\u4ee4<\/strong><\/span><\/div>\n
stat \u547d\u4ee4 \u67e5\u770b\u6587\u4ef6ctime atime mtime<\/div>\n
# stat anaconda-ks.cfg\r\n? File: \u2018anaconda-ks.cfg\u2019\r\n? Size: 2592 ? ? ? Blocks: 8 ? ? ? ? ?IO Block: 4096 ? regular file\r\nDevice: 803h\/2051d Inode: 33574996 ? ?Links: 1\r\nAccess: (0600\/-rw-------) ?Uid: ( ? ?0\/ ? ?root) ? Gid: ( ? ?0\/ ? ?root)\r\nAccess: 2018-09-20 05:57:35.329041552 +0800\r\nModify: 2018-09-20 05:57:35.334041552 +0800\r\nChange: 2018-09-20 05:57:35.334041552 +0800\r\n?Birth: -\r\n[root@master ~]# stat \/dev\/null\r\n? File: \u2018\/dev\/null\u2019\r\n? Size: 0 ? ? ? ? Blocks: 0 ? ? ? ? ?IO Block: 4096 ? character special file\r\nDevice: 5h\/5d Inode: 5930 ? ? ? ?Links: 1 ? ? Device type: 1,3\r\nAccess: (0666\/crw-rw-rw-) ?Uid: ( ? ?0\/ ? ?root) ? Gid: ( ? ?0\/ ? ?root)\r\nAccess: 2019-01-21 16:27:54.255000135 +0800\r\nModify: 2019-01-21 16:27:54.255000135 +0800\r\nChange: 2019-01-21 16:27:54.255000135 +0800\r\n?Birth: -\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"

\u666e\u901a\u6587\u4ef6\u7c7b\u578b Linux\u4e2d\u6700\u591a\u7684\u4e00\u79cd\u6587\u4ef6\u7c7b\u578b, \u5305\u62ec \u7eaf\u6587\u672c\u6587\u4ef6(ASCII)\uff1b\u4e8c\u8fdb\u5236\u6587\u4ef6(binary)\uff1b\u6570 […]<\/p>\n","protected":false},"author":643,"featured_media":135740,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-135739","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/135739","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/643"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=135739"}],"version-history":[{"count":6,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/135739\/revisions"}],"predecessor-version":[{"id":138027,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/135739\/revisions\/138027"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/135740"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=135739"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=135739"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=135739"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}