文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>测试文件

测试文件

时间:2009-07-19  来源:zhujinzz

#!/bin/bash
#this script gives information about a file
FILENAME="$1" echo "Properties for $FILENAME:"  if [ -f $FILENAME ];then
  echo "Size is $(ls -lh $FILENAME | awk '{print $5}')"
  echo "Type is $(file $FILENAME | cut -d":" -f2 -)" #或者echo "Type is $(file $FILENAME | awk 'BEGIN{FS=":"}{print $2}')"
  echo "Inode number is $(ls -i $FILENAME | cut -d" " -f1 -)" #或者echo "Inode number is $(ls -i $FILENAME | awk '{print $1}')"
  echo "$(df -h $FILENAME | grep -v Mounted | awk '{print "On",$1",\
which is mounted as the ",$6,"partition."}')"
 else
  echo "File does not exist."
fi
相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载