ubuntu——ls-l命令详解

以ubuntu14.04为例
ls -l命令

将某目录以详细列表的形式进行展示
以root的家目录为例

ubuntu——ls-l命令详解

还有个比较常用的命令ll

ubuntu——ls-l命令详解

可以看出ll和ls -l展示的内容差不多,只是ll将隐藏文件展示了出来。
第1字段: 文件属性字段

文件属性字段总共由10个字母组成
第1位字符代表文件的类型。
字母“-”表示该文件是一个普通文件;
字母“d”表示该文件是一个目录,字母”d”,是dirtectory目录的缩写;
其余字母“l”、“b”、“c”、“p”、“s”不是很常用。
第2~4位:表示文档所有者的权限,第2位表示读权限的情况,取值有r和-;第3位表示写权限的情况,w表示可写,-表示不可写,第4位表示执行权限的情况,取值有x和-。
第5~7位:表示与所有者同在一个组的用户的权限情况,第5位表示读权限的情况,取值有r和-;第6位表示写权限的情况,w表示可写,-表示不可写,第7位表示执行权限的情况,取值有x和-。
第8~10位:表示除了上面前2部分的用户以外的其他用户的权限情况,第8位表示读权限的情况,取值有r和-;第9位表示写权限的情况,w表示可写,-表示不可写,第10位表示执行权限的情况,取值有x和-。
第2字段:文件硬链接数
第3字段:文件(目录)拥有者

该字段表示此文件是属于哪个用户。linux类系统都是多用户系统,每个文件都有它的拥有者。只有文件的拥有者才具有改动文件属性的权利。root用户具有改动任何文件属性的权利。对于一个目录来说,只有拥有该目录的用户,或者具有写权限的用户才有在目录下创建文件的权利。
第4字段:文件(目录)拥有者所在的组

一个用户可以加入很多个组,但是其中有一个是主组,就是显示在第4字段的名称。
第5字段: 文件所占用的空间(以字节为单位)
第6字段:文件(目录)最近访问(修改)时间
第7字段:文件(目录)名

小结:
在日常开发与运维的过程中,我一般都是用ll命令查看一下某文件的修改时间。比如系统快要上线了,把项目war放到服务器上去,通过scp命令上传到服务器后,到所在目录执行ll命令,看一下该war文件的更新时间。

原文链接:,转发请注明来源!

发表评论

  • 30 Responses to “ubuntu——ls-l命令详解”
    • JbdcAniny

      viagra 25mg online <a href="http://llviabest.com/#">viagra vs cialis</a> amlodipine and viagra http://llviabest.com/ - viagra for women in australia ’

      回复
    • Fbdhprest

      cialis buy australia online <a href="http://21cialismen.com/#">cialis canada generic</a> cialis professional india http://21cialismen.com/ - cialis onine ’

      回复
    • Nlbxprest

      generic cialis usps priority mail <a href="http://cialijomen.com/#">cialis free offer</a> generic cialis 40 mg http://cialijomen.com/ - cialis 20 mg ’

      回复
    • FsbxAniny

      what is the best viagra alternative <a href="http://genericrxxx.com/#">viagra on line</a> viagra austrlia http://genericrxxx.com/ - viagra generic wholesale ’

      回复
    • AqbvAniny

      canadian pharmacy cheap viagra <a href="http://acialaarx.com/#">viagra in pakistan</a> viagra http://acialaarx.com/ - denver viagra ’

      回复
    • Fgnhprest

      viagra that takes mastercard <a href="http://ltdviagragogo.com/#">viagra ireland paypal</a> how much does a prescription of viagra cost free samples viagra cialis <a href="http://hdgenericviagraxk.com/#">where to buy viagra singapore</a> viagra online overnight delivery how to take viagra <a href="http://buygenericviarga.com/#">best place to buy viagra in sydney</a> viagra suppliers canada viagra japan <a href="http://buyhdpillvia.com/#">viagraonlineaustralia</a> cheap generic viagra on line for sale viagra australia <a href="http://genericviagrix.com/#">buy viagra online overnight shipping</a> buy pfizer viagra online

      回复
    • Nlbxprest

      viagra canada pharmacy <a href="http://viashoprx.com/#">viagra generic canada</a> viagra super active online nitric oxide and viagra together <a href="http://xviagarrx.com/#">viagra no prescription</a> best place to buy real viagra online chewable viagra soft tabs <a href="http://viagraviagria.com/#">viagra in japan</a> viagra for women australia cost of viagra 100mg <a href="http://asgenviagria.com/#">cheap viagra 50 mg</a> viagra professional buy online viagra sale cheap <a href="http://viagengen.com/#">what are the price of viagra at walmart</a> diabetes and viagra

      回复
    • FnrdAniny

      buy viagra 50mg <a href="https://llviabest.com/#">viagra australia paypal accepted</a> viagra by ajanta pharma

      回复
    • FtghAniny

      write me a research paper <a href="https://thesiswritinghelpsjj.com/#">hunter college essay</a> help write an equation

      回复
    • FnsbAniny

      buy term papers <a href="https://customessaywriterbyz.com/#">being a college student essay</a> grad school personal statement

      回复
    • Dvscprest

      writing a literary research paper <a href="https://dissertationhelpvfh.com/#">writing narrative essay</a> writing a essay about yourself

      回复
    • Fgsprest

      writing a dissertation in a week <a href="https://writemypaperbuyhrd.com/#">writing a critical review essay</a> good cover letter

      回复
    • Jgscblafe

      economic term paper <a href="https://thesisbyd.com/#">leadership dissertation</a> need help to write a book

      回复
    • FnrhAniny

      viagra 2 day delivery <a href="https://genqpviag.com/#">viagra minn</a> generic viagra

      回复
    • FqfAniny

      help with dissertation writing <a href="https://essaywritingservicesjy.com/#">do my essay</a> college essay starters

      回复
    • FsfAniny

      university assignments for sale <a href="https://essayhelpbgs.com/#">cpm math homework help</a> help writing a dissertation

      回复
    • FbsbAniny

      comparison between cialis viagra and levitra <a href="https://genericrxxx.com/#">viagra pour ejp</a> pfizer viagra price in pakistan

      回复
    • Dbsfprest

      best place to buy viagra online <a href="https://lightvigra.com/#">75 mg viagra</a> where to purchase viagra in canada

      回复
    • Fdbvprest

      best price viagra uk <a href="https://hopeviagrin.com/#">viagra fast delivery usa</a> sildenafil canada paypal

      回复
    • FmsgAniny

      effect on women taking viagra <a href="https://siviagmen.com/#">4rx viagra</a> viagra fГјr die frau preisvergleich

      回复
    • Jsweblafe

      order sildenafil citrate <a href="https://mygoviagar.com/#">buy sildenafil 25 mg</a> viagra united states

      回复
    • FevbAniny

      cheap prices for viagra <a href="https://wowviaprice.com/#">buy viagra in atlanta in a store</a> online viagra sales

      回复
    • FhsbAniny

      viagra naturale in erboristeria <a href="https://buybuyviamen.com/#">https://buybuyviamen.com</a> viagra in aachen

      回复
    • Devkprest

      after market viagra <a href="https://paradiseviagira.com/#">bayviagra</a> viagra for sale

      回复
    • Frbhprest

      buy viagra in canada toronto <a href="https://paradiseviagira.com/#">https://paradiseviagira.com</a> generic viagra australia buy

      回复
    • Jivhblafe

      viagra Г  50 ans <a href="https://purevigra.com/#">government pays for viagra</a> puedo partir la pastilla de viagra

      回复
    • FbsgAniny

      joe elliott viagra <a href="https://buybuyviamen.com/#">viagra over the counter northern ireland</a> medicintilskud viagra

      回复
    • JildcAniny

      online generic viagra reviews http://fmedrx.com/ <a href="http://fmedrx.com/#">best place to buy generic viagra review</a> generic viagra in usa

      回复
    • KmrfAniny

      buying viagra online canada http://usggrxmed.com/ <a href="http://usggrxmed.com/#">cheap viagra generic</a> is there a generic viagra

      回复
    • Stephenpeaky

      discount viagra <a href=" http://sild100fast.com/# ">buy viagra online</a> viagra over the counter usa 2020

      回复