#!/bin/sh myfile=/home/liu 这个是文件的路径 fd = `ls -l myfile` 获取文件的所有属性 fp= ${fd:0:1} if ["$fp" = "c"] then cp myfile /dev fi
本文来自博客园,作者:摩斯电码,未经同意,禁止转载