⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ls.1

📁 压缩包中包含LINUX下多个命令的源码
💻 1
字号:
.\"	$OpenBSD: ls.1,v 1.23 2000/03/24 21:41:08 aaron Exp $.\"	$NetBSD: ls.1,v 1.14 1995/12/05 02:44:01 jtc Exp $.\".\" Copyright (c) 1980, 1990, 1991, 1993, 1994.\"	The Regents of the University of California.  All rights reserved..\".\" This code is derived from software contributed to Berkeley by.\" the Institute of Electrical and Electronics Engineers, Inc..\".\" Redistribution and use in source and binary forms, with or without.\" modification, are permitted provided that the following conditions.\" are met:.\" 1. Redistributions of source code must retain the above copyright.\"    notice, this list of conditions and the following disclaimer..\" 2. Redistributions in binary form must reproduce the above copyright.\"    notice, this list of conditions and the following disclaimer in the.\"    documentation and/or other materials provided with the distribution..\" 4. Neither the name of the University nor the names of its contributors.\"    may be used to endorse or promote products derived from this software.\"    without specific prior written permission..\".\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION).\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF.\" SUCH DAMAGE..\".\"     @(#)ls.1	8.7 (Berkeley) 7/29/94.\".Dd July 29, 1994.Dt LS 1.Os.Sh NAME.Nm ls.Nd list directory contents.Sh SYNOPSIS.Nm ls.Op Fl 1ACFLRSTWacdfgiklmnopqrstux.Op Ar file ....Sh DESCRIPTIONFor each operand that names a.Ar fileof a type other thandirectory,.Nmdisplays its name as well as any requested,associated information.For each operand that names a.Ar fileof type directory,.Nmdisplays the names of files containedwithin that directory, as well as any requested, associatedinformation..PpIf no operands are given, the contents of the currentdirectory are displayed.If more than one operand is given,non-directory operands are displayed first; directoryand non-directory operands are sorted separately and inlexicographical order..PpThe options are as follows:.Bl -tag -width indent.It Fl AList all entries except for.Dq \&.and.Dq \&.. .Always set for the super-user..It Fl CForce multi-column output; this is the default when output is to a terminal..It Fl FDisplay a slash.Pq Sq /immediately after each pathname that is a directory,an asterisk.Pq Sq \&*after each that is executable,an at sign.Pq Sq @after each symbolic link,a percent sign.Pq Sq %after each whiteout,an equal sign.Pq Sq =after each socket,and a vertical bar.Pq Sq \&|after each that is a FIFO..It Fl LIf argument is a symbolic link, list the file or directory the link referencesrather than the link itself..It Fl RRecursively list subdirectories encountered..It Fl SSort by size, largest file first..It Fl TDisplay complete time information for the file, includingmonth, day, hour, minute, second, and year.This option has no effect unless one of the long format.Pq Fl l , Fl noptions is also specified..It Fl WDisplay whiteouts when scanning directories..It Fl aInclude directory entries whose names begin with adot.Pq Sq \&. ..It Fl cUse time file's status was last changed instead of last modificationtime for sorting.Pq Fl tor printing.Pq Fl l , Fl n ..It Fl dDirectories are listed as plain files (not searched recursively) andsymbolic links in the argument list are not indirected through..It Fl fOutput is not sorted..It Fl gDoes nothing; kept for compatibility with older versions of.Xr ls 1 ..It Fl iFor each file, print its inode number..It Fl kModifies the.Fl soption, causing the sizes to be reported in kilobytes.Overrides any value specified by the.Ev BLOCKSIZEenvironment variable..It Fl l(The lowercase letter.Dq ell. Ns )List in long format (see below).If the output is to a terminal, a total sum of all filesizes is output on a line before the long listing..It Fl mStream output format; list files across the page, separated by commas..It Fl nList in long format as in.Fl l ,but retain user and group IDs in a numeric format..It Fl oInclude the file flags in a long format.Pq Fl l , Fl noutput..It Fl pDisplay a slash.Pq Sq \&/immediately after each pathname that is a directory..It Fl qForce printing of non-graphic characters in file names asthe character.Dq ? ;this is the default when output is to a terminal..It Fl rReverse the order of the sort to get reverselexicographical order or the smallest or oldest entries first..It Fl sDisplay the number of file system blocks actually used by each file,where partial units are rounded up to the next integer value.Blocks are 512 bytes unless overridden by the.Fl kflag or.Ev BLOCKSIZEenvironment variable..It Fl tSort by time modified (most recently modifiedfirst) before sorting the operands in lexicographicalorder..It Fl uUse file's last access timeinstead of last modification timefor sorting.Pq Fl tor printing.Pq Fl l , Fl n ..It Fl xMulti-column output sorted across the page rather than down the page..It Fl \&1(The numeric digit.Dq one. Ns )Force output to be one entry per line.This is the default whenoutput is not to a terminal..El.PpThe.Fl 1 ,.Fl C ,.Fl l ,and.Fl noptions all override each other; the last one specified determinesthe format used..PpThe.Fl cand.Fl uoptions override each other; the last one specified determinesthe file time used.The.Fl foption overrides any occurrence of either..PpBy default,.Nmlists one entry per line to standardoutput; the exceptions are to terminals or when the.Fl Cor.Fl moptions are specified..PpFile information is displayed with one or more<blank>s separating the information associated with the.Fl i ,.Fl s ,.Fl l ,and.Fl noptions..Ss The Long FormatIf the.Fl lor.Fl noptions are given, the following informationis displayed for each file:mode,number of links,owner,group,size in bytes,time of last modification.Pq Dq mmm dd HH:MM ,and the pathname.In addition, for each directory whose contents are displayed, the firstline displayed is the total number of blocks used by the files in thedirectory.Blocks are 512 bytes unless overridden by the.Fl koption or.Ev BLOCKSIZEenvironment variable..PpIf the owner or group name is not a known user or group name, respectively,or the.Fl noption is given, the numeric ID is displayed..PpIf the file is a character special or block special file,the major and minor device numbers for the file are displayedin the size field..PpIf the.Fl Toption is given, the time of last modification is displayed using theformat.Dq mmm dd HH:MM:SS CCYY ..PpIf the file is a symbolic link, the pathname of thelinked-to file is preceded by.Dq \-> ..PpThe file mode printed under the.Fl lor.Fl noptions consists of the entry type, owner permissions, and grouppermissions.The entry type character describes the type of file, as follows:.Pp.Bl -tag -width 4n -offset indent -compact.It Sy bblock special file.It Sy ccharacter special file.It Sy ddirectory.It Sy lsymbolic link.It Sy ssocket link.It Sy p.Tn FIFO.It Sy wwhiteout.It Sy \-regular file.El.PpThe next three fieldsare three characters each:owner permissions,group permissions, andother permissions.Each field has three character positions:.Pp.Bl -enum -offset indent -compact.ItIf.Sy r ,the file is readable; if.Sy \- ,it is not readable..ItIf.Sy w ,the file is writable; if.Sy \- ,it is not writable..ItThe first of the following that applies:.Bl -tag -width 4n -offset indent.It Sy SIf in the owner permissions, the file is not executable andset-user-ID mode is set.If in the group permissions, the file is not executableand set-group-ID mode is set..It Sy sIf in the owner permissions, the file is executableand set-user-ID mode is set.If in the group permissions, the file is executableand setgroup-ID mode is set..It Sy xThe file is executable or the directory issearchable..It Sy \-The file is neither readable, writable, executable,nor set-user-ID, nor set-group-ID, nor sticky (see below)..El.PpThese next two apply only to the third character in the last group(other permissions):.Bl -tag -width 4n -offset indent.It Sy TThe sticky bit is set(mode.Li 1000 ) ,but neither executable nor searchable (see.Xr chmod 1or.Xr sticky 8 ) ..It Sy tThe sticky bit is set (mode.Li 1000 ) ,and is searchable or executable(see.Xr chmod 1or.Xr sticky 8 ) ..El.El.PpIn addition, if the.Fl ooption is specified, the file flags (see.Xr chflags 1 )are displayed as comma-separated strings in front of the file size,abbreviated as follows:.Pp.Bl -tag -width 8n -offset indent -compact.It \&-no flags.It uappnduser append-only.It uchguser immutable.It nodumpdo not dump.It opaqueopaque file.It sappndsystem append-only.It archarchived.It schgsystem immutable.El.PpThe.Nmutility exits 0 on success or >0 if an error occurred..Sh ENVIRONMENTThe following environment variables affect the execution of.Nm ls :.Bl -tag -width BLOCKSIZE.It Ev BLOCKSIZEIf the environment variable.Ev BLOCKSIZEis set, and the.Fl koption is not specified, the block counts(see.Fl s )will be displayed in units of that size block..It COLUMNSIf this variable contains a string representing adecimal integer, it is used as thecolumn position width for displayingmultiple-text-column output.The.Nmutility calculates howmany pathname text columns to displaybased on the width provided(see.Fl C ) ..It Ev TZThe timezone to use when displaying dates.See.Xr environ 7for more information..El.Sh COMPATIBILITYThe group field is now automatically included in the long listing forfiles in order to be compatible with the.St -p1003.2specification..Sh SEE ALSO.Xr chflags 1 ,.Xr chmod 1 ,.Xr symlink 7 ,.Xr sticky 8.Sh HISTORYAn.Nmutility appeared in.At v5 ..Sh STANDARDSThe.Nmutility is expected to be a superset of the.St -p1003.2specification.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -