UNIX下的ls命令的输出格式(ZT)

UNIX下的ls命令的输出格式 作者:一笑而过 2006-05-22 12:39:59 标签:   

这是UNIX下的ls命令的输出格式, Column 2 - Number of links Column 3 - Owner of the file. Normally the owner of the file is the user account that originally created it.

Column 4 - Group under which the  file belongs. This is by default the  group to which the account belongs or first three letters of the userid. The group can be changed by the chgrp command.

Column 5 - Size of file (bytes).

Column 6 - Date of last update

Column 7 - Name of file 这是一篇关于其输出内容的文章 http://www.gsu.edu/~wwwhcs/DOCS/Unix/lsunix.html

下面贴出文章的内容 The LS Command on UNIX The ls command lists the files  in your current working directory. When  you log onto  your account  on UNIX,  your current  working directory  is your  home or personal directory. This is the directory in which you have personal disk  space to put  files on  or to  create sub-directories  under. The  ls command also has options available. Options follow the hyphen ( - ) sign. Two of the most  useful options are a (return  all files, even "hidden")  and l (give long  or full file information). The ls command also accepts strings with the asterisk * used as  a "wildcard" to tell UNIX to search  for all files that contain the  specified sub -string.

Example

$ ls -al *test*

-rw-r--r--     1 hcsdar   usg          592   Sep  1  1993        .test drwx------     2 hcsdar   usg          512   Nov 11 16:21        dirtest -rw-r--r--     2 hcsdar   usg         1097   Nov  2  1993        test -rw-------     1 hcsdar   usg         1097   Oct 19 15:54        test.bin -rw-------     1 hcsdar   usg         1216   Jul 15  1993        test.fil

What Does This Tell You? Columns 1              2    3         4    5    6              7 -rw-r--r--     1    hcsdar    usg  592  Sep  1  1993   .test drwx------     2    hcsdar    hcs  512  Nov 11 16:21   dirtest

Column 1

 

Column 1 tells you the  type of file, what privileges  it has and to whom  these privileges are  granted. There  are three  types of  privileges. Read  and write privileges  are  easy  to  understand.  The  exec  privilege  is  a  little more difficult. You can make a file  "executable" by giving it exec privileges.  This means that commands in the file will be executed when you type the file name  in at the UNIX prompt. It also means that when a directory which, to UNIX is a file like any other file, can be "scanned" to see what files and sub-directories  are in it. Privileges are granted to three levels of users:

1) the owner of the file. The owner is usually, but not always, the userid  that created the file. 2) the group to which the owner belongs. At GSU, the group is usually, but not always designated as the first three letters of the userid of the owner. 3) everybody else who has an account on the UNIX machine where the file resides. Column 2 - Number of links Column 3 - Owner of the file. Normally the owner of the file is the user account that originally created it.

Column 4 - Group under which the  file belongs. This is by default the  group to which the account belongs or first three letters of the userid. The group can be changed by the chgrp command.

Column 5 - Size of file (bytes).

Column 6 - Date of last update

Column 7 - Name of file

Other Handouts on UNIX The chmod Command Changing Directories on UNIX

Help Center Services June 19, 1995 DAR/DRF lsunix.027

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值