新建一个文件,自定义时间点
[root@nhserver2 ~]# touch -t 1403010000.00 file1.txt 新建一个文件,自定义时间点
[root@nhserver2 ~]# ll --full-time
[root@nhserver2 ~]# find ./ -type f -newer file1.txt
只要第一层
[root@nhserver2 ~]# find ./ -maxdepth 1 -type f -newer file1.txt
在~处打包为tar,z参数为压缩
[root@nhserver2 ~]# find ./ -maxdepth 1 -type f -newer file1.txt | xargs tar -zcvf 111.tar
解压,打包有z参数,解压也要有z参数。-C指定解压的目的地
[root@nhserver2 ~]# tar -zxvf 111.tar -C ~
转载于:https://www.cnblogs.com/nhlinkin/p/3633469.html
最后
以上就是幽默月饼最近收集整理的关于find与tar的结合使用的全部内容,更多相关find与tar内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复