#/usr/bin/bsh
path_file_list="/home/zwh/backup/"
fn_file_list="$path_file_list/file_list"
fn_file_list_tmp="$path_file_list/file_list_tmp"
fn_md5_file_list="$path_file_list/md5_list"
#替换配置路径中的日期格式
replace_date()
{
$file=$1
cat $file | while read line
do
if [ ]; then
day=`echo "$path" | awk -F"%" '{print $1;}'`
day=`date %Y%m%d -d '-$day day'`
path=`echo "$path" | sed s/%YMD-\d+%/$day/ `
fi
echo "$path" >> $newconf
done
}
#替换软链接文件
replace_symbolic_link()
{
input_path=$1
output_path=$2
find "$input_path" -type l -exec file '{}' \; | awk -F": symbolic link to \`" '{ if( match("^/*$",$2) ==0 ){print $2;} }' >> "$output_path"
}
create_file_list()
{
path_tmp="$fn_file_list_tmp".tmp
# 获取所有文件列表
find "$path_file_list" -type f > "$path_tmp"
# 获取所有软链接文件列表
replace_symbolic_link "$path_file_list" "$path_tmp"
# 排序
cat "$path_tmp" | sort > "$fn_file_list_tmp"
rm -f "$path_tmp"
# 生成MD5值
cat "$fn_file_list_tmp" | xargs md5sum >> "$fn_md5_file_list"
}
repalce_date $1
分享到:
相关推荐
教程名称:linux服务器性能调优文档(未完待续)课程目录:linux服务器性能调优01linux服务器性能调优02linux服务器性能调优03linux服务器性能调优04linux服务器性能调优05linux服务器性能调优06linux服务器性能调优07...
android播放器未完待续
9--[小黑点的旅行(未完待续)].zip源码scratch2.0 3.0编程项目源文件源码案例素材源代码9--[小黑点的旅行(未完待续)].zip源码scratch2.0 3.0编程项目源文件源码案例素材源代码9--[小黑点的旅行(未完待续)].zip...
小黑点的旅行(未完待续)-少儿编程scratch项目源代码文件案例素材.zip
softmax回归相关Python代码(未完待续)
供热工程设计说明文书未完待续.doc
个人手机网游作品展示,未完待续
大数据Java面试总结(未完待续).docx
linux脚本sftp上传文件
EOS开发入门之cleos命令解读(未完待续)1
循环水冷却水系统未完待续资料PPT学习教案.pptx
小白必看;前端一年工作经验,遇到的各种问题总结, 未完待续
2015年高中语文优秀作文青春未完待续…素材
水泥行业报告:梦回2010年,水泥行情未完待续
PHP环境探针(未完待续,仅供参考) 集成 oracle,redis,imagick等检测 使用前需简单配置 路径 谢谢
A股市场策略周报:跨年行情,不要犹豫,未完待续
20210705-建信期货-聚烯烃半年报:扩能周期未完待续.pdf
《Web前端入门_从零开始做网站》讲义(未完待续).pdf
系统集成项目管理工程师重点冲刺 计算题详细解析 未完待续PPT学习教案.pptx
电力设备与新能源行业研究:光伏内需回暖获验证,特斯拉好戏未完待续.pdf