tar --newer-mtime 这个命令是不是有问题?

金丝龙麟闪电劈 2013-12-20 10:28:38
tar --newer-mtime 这个命令是不是有问题?
比如,我要备份2013-12-01 以后更新的文件,怎么连所有的目录都给打包进来了
命令如下:
tar -zcv -f bak20131201later.tar.bz2 --newer-mtime="2013/12/01" /etc/*
...全文
349 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
引用 2 楼 ljc007 的回复:
tar -zcv -f bak20131201later.tar.bz2 --newer-mtime="2013/12/01" /etc/*.*
还是那样呀.只不过是仅包含把带.的目标了
ljc007 2013-12-23
  • 打赏
  • 举报
回复
tar -zcv -f bak20131201later.tar.bz2 --newer-mtime="2013/12/01" /etc/*.*
  • 打赏
  • 举报
回复
windows中打包tar文件 GUN tar 和在unix中使用tar命令基本上一样的。可以使用tar --help得到帮助的详细信息。 ------------------------------------------- GNU `tar' saves many files together into a single tape or disk archive, and can restore individual files from the archive. Usage: tar [OPTION]... [FILE]... If a long option shows an argument as mandatory, then it is mandatory for the equivalent short option also. Similarly for optional arguments. Main operation mode: -t, --list list the contents of an archive -x, --extract, --get extract files from an archive -c, --create create a new archive -d, --diff, --compare find differences between archive and file system -r, --append append files to the end of an archive -u, --update only append files newer than copy in archive -A, --catenate append tar files to an archive --concatenate same as -A --delete delete from the archive (not on mag tapes!) Operation modifiers: -W, --verify attempt to verify the archive after writing it --remove-files remove files after adding them to the archive -k, --keep-old-files don't overwrite existing files when extracting -U, --unlink-first remove each file prior to extracting over it --recursive-unlink empty hierarchies prior to extracting directory -S, --sparse handle sparse files efficiently -O, --to-stdout extract files to standard output -G, --incremental handle old GNU-format incremental backup -g, --listed-incremental handle new GNU-format incremental backup --ignore-failed-read do not exit with nonzero on unreadable files Handling of file attributes: --owner=NAME force NAME as owner for added files --group=NAME force NAME as group for added files --mode=CHANGES force (symbolic) mode CHANGES for added files --atime-preserve don't change acces

19,612

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧