- 论坛徽章:
- 0
|
原帖由 tombaby 于 2006-4-26 13:21 发表
to:sunyone 不行呀报以下错:
[root@nmhp1-yd:/]#ll --time-style=long-iso
ll: illegal option -- -
ll: illegal option -- -
ll: illegal option -- y
ll: illegal option -- =
ll: illegal option -- - ...
呵呵,这个是linux才有的
hp没有,实现比较麻烦
1. 使用els程序
2. 下面的perl程序
#!/usr/contrib/bin/perl
foreach $file (@ARGV) {
@stat = stat $file;
print \"$file\\n\";
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($stat[8]);
print \"Access time: \", $mon+1, \"/$mday/\", $year+1900,\" $hour:$min:$sec\\n\";
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($stat[9]);
print \"Modification time: \", $mon+1, \"/$mday/\", $year+1900, \"$hour:$min:$sec\\n\";
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($stat[10]);
print \"Inode Modification time: \", $mon+1, \"/$mday/\",$year+1900, \"$hour:$min:$sec\\n\";
print \"\\n\";
} |
|