UNIX下的ls命令的输出格式(ZT)
2008-06-24 18:21
288 查看
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
作者:一笑而过 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
相关文章推荐
- 《The Linux Command Line》 读书笔记03 ls命令与长格式输出解释 文件权限
- UVa--400 Unix ls(格式输出)
- 'ls -l'命令输出格式简介
- [Linux]ls -l命令的输出格式[转加简化]
- [UVA400]Unix ls[格式输出]
- [awk] 一行命令处理文本的解析输出格式OFS
- diff命令输出格式解读
- 【Unix/Linux】【命令】【文本工具】将文件(尾部)写到标准输出——tail
- unix ls命令
- Linux命令之dos2unix - 将DOS格式文本文件转换成UNIX格式 用途说明
- [Linux技巧] 让date命令的输出格式符合你的习惯
- Linux命令格式与目录处理命令ls
- repquota命令_Linux repquota 命令用法详解:报表的格式输出磁盘空间限制的状态
- iconv内容,convmv文件名,unix2dos,dos2unix文件格式转换,od/cut/wc/dd/diff/uniq/nice/du等命令,linux文件名乱码,文件名,文件内容,vim编码设置
- Linux常用命令-文件处理命令-命令格式与目录处理命令ls
- 我使用过的Linux命令之dos2unix - 将DOS格式文本文件转换成UNIX格式
- 我使用过的Linux命令之dos2unix - 将DOS格式文本文件转换成UNIX格式
- 2018_2_9_Unix ls_格式_sort_字符串
- dos2unix命令将dos文件转换为unix格式
- Perl处理Unix命令输出