往事匆匆 發表於 2023-12-9 00:00:00

linux 查看文件的属性(ls,lsattr,file,stat)实例详解

<p>
        查看文件属性有多种方法,且这些方法中偏向不同,具体如下:</p>
<p>
        <strong>1,ls</strong></p>
<p>
            ls -a 查看所有文件</p>
<p>
            ls -l 查看详细的属性 </p>
<p>
        <strong>2,lsattr</strong></p>
<p>
            查看文件的扩展属性,</p>
<p>
            如果文件被 chattr +i   添加了写保护,</p>
<p>
            用lsattr可以看到添加的属性</p>
<p>
        <strong>3,file</strong></p>
<p>
        查看文件的类型</p>
<p>
        <strong>4,stat</strong></p>
<p>
            查看文件的状态</p>
<p>
        测试结果:</p>
<p>
        <img title="linux 查看文件的属性(ls,lsattr,file,stat)实例详解" alt="linux 查看文件的属性(ls,lsattr,file,stat)实例详解" id="theimg" src="https://zhuji.jb51.net/uploads/img/202305/aff9356604180702885d0fefc7b7908f.jpg"></p>
<p>
        感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!</p>
<p>
        原文链接:http://www.cnblogs.com/0616--ataozhijia/p/5606918.html</p>
頁: [1]
查看完整版本: linux 查看文件的属性(ls,lsattr,file,stat)实例详解