[Armadillo:08618] Re: ls コマンドの時間ソート
Yasuhisa Nakamura
email@hidden
2013年 2月 13日 (水) 15:20:05 JST
水口さん、
中村です。
> 話ついでに、ls -tlrの出力で日付をフルに取得する方法がありますでしょうか?
# ls -l /
drwxr-xr-x 2 root root 2048 Jan 17 11:08 bin/
drwxr-xr-x 2 root root 1024 Jan 15 04:31 boot/
drwxrwxrwt 10 root root 13480 Jan 4 2000 dev/
drwxr-xr-x 13 root root 1024 Jan 4 2000 etc/
drwxr-xr-x 6 root root 1024 Jan 17 11:08 home/
......
# ls -le /
drwxr-xr-x 2 root root 2048 Thu Jan 17 11:08:23 2013 bin/
drwxr-xr-x 2 root root 1024 Tue Jan 15 04:31:38 2013 boot/
drwxrwxrwt 10 root root 13480 Tue Jan 4 15:38:31 2000 dev/
drwxr-xr-x 13 root root 1024 Tue Jan 4 15:38:30 2000 etc/
drwxr-xr-x 6 root root 1024 Thu Jan 17 11:08:21 2013 home/
.....
# ls --help
ls: unrecognized option `--help'
BusyBox v1.00 (2012.12.28-06:20+0000) multi-call binary
Usage: ls [-1AacCdeFilnpLRrSsTtuvwxXhk] [filenames...]
List directory contents
Options:
-1 list files in a single column
-A do not list implied . and ..
-a do not hide entries starting with .
-C list entries by columns
-c with -l: show ctime
-d list directory entries instead of contents
-e list both full date and full time
-F append indicator (one of */=@|) to entries
-i list the i-node for each file
-l use a long listing format
-n list numeric UIDs and GIDs instead of names
-p append indicator (one of /=@|) to entries
-L list entries pointed to by symbolic links
-R list subdirectories recursively
-r sort the listing in reverse order
-S sort the listing by file size
-s list the size of each file, in blocks
-T NUM assume Tabstop every NUM columns
-t with -l: show modification time
-u with -l: show access time
-v sort the listing by version
-w NUM assume the terminal is NUM columns wide
-x list entries by lines instead of by columns
-X sort the listing by extension
-h print sizes in human readable format (e.g., 1K 243M 2G )
※ "--help"が認識されてヘルプとしてオプション一覧が表示されてるのではなく、
"unrecognized option `--help'" だそうです。
--
なかむら
armadillo メーリングリストの案内