Chinaunix首页 | 论坛 | 博客
  • 博客访问: 68458
  • 博文数量: 11
  • 博客积分: 276
  • 博客等级: 二等列兵
  • 技术积分: 145
  • 用 户 组: 普通用户
  • 注册时间: 2012-02-17 11:14
文章分类

全部博文(11)

文章存档

2012年(11)

我的朋友
最近访客

分类: LINUX

2012-02-18 14:41:02

l0=`ls -l /home/portal/test1|awk '{print $0}'`  #显示文件的详细信息
ll=`ls -l /home/portal/test1|awk '{print $1}'`  #显示文件权限
l2=`ls -l /home/portal/test1|awk '{print $2}'`  #
l3=`ls -l /home/portal/test1|awk '{print $3}'`  #显示当前用户
l4=`ls -l /home/portal/test1|awk '{print $4}'`  #显示users
l5=`ls -l /home/portal/test1|awk '{print $5}'`  #显示byte大小
l6=`ls -l /home/portal/test1|awk '{print $6}'`  #显示更新时间
l7=`ls -l /home/portal/test1|awk '{print $7}'`  #显示当前时间
l8=`ls -l /home/portal/test1|awk '{print $8}'`  #显示文件所在目录
l9=`ls -l /home/portal/test1|awk '{print $9}'`  #null
l10=`ls -l /home/portal/test1|awk '{print $10}'`  #null
l11=`ls -l /home/portal/test1|awk '{print $11}'`  #null
echo "l0 value is $l0"
echo "ll value is $ll"
echo "l2 value is $l2"
echo "l3 value is $l3"
echo "l4 value is $l4"
echo "l5 value is $l5"
echo "l6 value is $l6"
echo "l7 value is $l7"
echo "l8 value is $l8"
echo "l9 value is $l9"
echo "l10 value is $l10"
echo "ll1 value is $l11"

输出信息如下:
l0 value is -rwxr-xr-x 1 portal users 870 2011-02-17 17:31 /home/portal/test1  
ll value is -rwxr-xr-x
l2 value is 1
l3 value is portal
l4 value is users
l5 value is 870
l6 value is 2011-02-17
l7 value is 17:31
l8 value is /home/portal/test1
l9 value is
l10 value is
ll1 value is
阅读(1945) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~