写一个脚本,像以下方式备份文本内容,并确认备份成功。

cat /home/test/backupfilelist.conf  这个文本的内容可以自己添加或减少。/etc/ldap.conf/etc/host.conf/etc/resolv.conf写一个脚本,像以下方式备份文本内容,并确认备份成功。cp -ip /etc/ldap.conf  /etc/ldap.conf.`/usr/bin/date +%Y%m%d`...显示全部
cat /home/test/backupfilelist.conf  这个文本的内容可以自己添加或减少。
/etc/ldap.conf
/etc/host.conf
/etc/resolv.conf

写一个脚本,像以下方式备份文本内容,并确认备份成功。
cp -ip /etc/ldap.conf  /etc/ldap.conf.`/usr/bin/date +%Y%m%d`收起
参与10

查看其它 8 个回答huyangg的回答

huyangghuyangg技术经理hgg
cp -ip /etc/ldap.conf  /etc/ldap.conf.`/usr/bin/date +%Y%m%d`
if [ $? = 0 ]; then
echo "backup successfully!"
exit 0
else
exit 1
fi
互联网服务 · 2013-01-30
浏览1002

回答者

huyangg
技术经理hgg
擅长领域: 网卡网络服务器

huyangg 最近回答过的问题

回答状态

  • 发布时间:2013-01-30
  • 关注会员:1 人
  • 回答浏览:1002
  • X社区推广