- 论坛徽章:
- 84
|
原帖由 xxjoyjn 于 2006-4-19 12:29 发表
如果在/下面有多个文件,如file1 file2 file3 file4 file5 file6 file7 file8 file9
ls命令的结果在终端显示为:
file1 file4 file7
file2 file5 file8
file3 file6 fil ...
用 -C 选项:
[root@142 work]# ls -C | head -n1
build_env.sh draw.sh function2.sh kkk pwd2full.sh test.sh
The output is to stdout, one entry per line, unless multicolumn output is
requested by the -C option. However, for output to a terminal, it is unde-
fined whether the output will be single-column or multi-column. The
options -1 and -C can be used to force single-column and multi-column out-
put, respectively.
POSIX OPTIONS
-C List files in columns, sorted vertically. |
|