免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 848 | 回复: 0
打印 上一主题 下一主题

HELP!! HELP !! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-09-05 11:19 |只看该作者 |倒序浏览
1.        You are required to write a backup linux bash script.
The script should ask the user a directory to backup.  It should then go and search the users home directory for existence of that directory. If it is found it should tar/gzip all the files and directories in that directory preserving the directory structure in a file named with the directory name and a appended integer. It should store the tarred file in a directory called backups in the home directory.  Each time the script is run, it should make a tar file with the directory name and an appended incremented digit.

Eg. Filenames could be myfiles1.tar.gz, myfiles2.tar.gz, mypictures4.tat.gz
You do not need to increment sequentially the files for each directory although those who are under-worked may do so.

If multiple occurrences of the directory are found then the script should output all the occurrences of the directories and the user the particular directory that needs to be backed up. Read the in the new particular directory that needs to be backed up and back it up as above.

If  the directory does not exist the exit with an appropriate message.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP