例子12:用‘-n’选项列举文件的uid&gid或者文件路径
[root@localhost /]# ls -n
total 14476
-rw-rw-r-- 1 1000 1000 193 Aug 16 16:10 1
-rw-rw-r-- 1 1000 1000 262 Nov 28 12:35 Anjali and Aakash help Yohan-B3MzR5cTpd2mLBSZfkPKppip8vCTKUdd.mp4.part
-rw-rw-r-- 1 1000 1000 1849048 Jun 7 2014 BINGO from Super Simple Songs-9mmF8zOlh_g.mp4.part
drwxr-xr-x 18 1000 1000 4096 Dec 13 08:59 Desktop
drwxr-xr-x 2 1000 1000 4096 Sep 27 13:09 Documents
drwxr-xr-x 2 1000 1000 4096 Dec 2 10:10 Downloads
drwx------ 3 1000 1000 4096 Nov 30 15:36 Dropbox
-rw-rw-r-- 1 1000 1000 94296 Nov 20 02:00 dropbox_2.10.0_amd64.deb
-rw-r--r-- 1 1000 1000 8980 Apr 20 2014 examples.desktop
-rw-rw-r-- 1 1000 1000 203 Oct 26 16:02 fs.sh
drwxrwxr-x 2 1000 1000 4096 Sep 1 14:31 Google Drive
................................................................
例子13:ls命令的默认别名
在终端上键入alias命令用来显示ls命令设置默认的别名。
[root@localhost /]# alias
alias cp='cp -i'
alias l.='ls -d .* --color=auto'
alias ll='ls -l --color=auto'
alias ls='ls --color=auto'
alias mv='mv -i'
alias rm='rm -i'
alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
例子14:用‘-time –style ’选项在ls命令输出之后显示时间戳
[root@localhost /]# ls -l --time-style="+%Y-%m-%d $newline%m-%d %H:%M"
total 12378
dr-xr-xr-x. 2 root root 4096 2014-11-23 11-23 03:13 bin
dr-xr-xr-x. 5 root root 1024 2014-11-23 11-23 05:29 boot
drwxr-xr-x 10 root root 4096 2014-11-23 11-23 03:42 cgroup
drwxr-xr-x 18 root root 3680 2014-12-12 12-12 21:32 dev
drwxr-xr-x. 64 root root 4096 2014-12-12 12-12 21:32 etc
drwxr-xr-x 8 root root 4096 2014-07-19 07-19 02:43 home
dr-xr-xr-x. 8 root root 4096 2014-05-03 05-03 05:24 lib
dr-xr-xr-x. 8 root root 12288 2014-11-23 11-23 03:13 lib64
-rw-r--r-- 1 root root 12582912 2014-12-12 12-12 22:05 linux-stuff
drwx------. 2 root root 16384 2014-05-03 05-03 05:19 lost+found
drwxr-xr-x. 2 root root 4096 2011-09-23 09-23 07:50 media
......................................................................
点击这里查看原文