![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
GNU/Linux 命令
空字符(公众号:月来客栈)
Talk is cheap, show me your code.
展开
-
ls实现列文件按时间排序
转自: http://blog.csdn.net/gtuu0123/article/details/4420424 1) ls -lt 时间最近的在前面 2) ls -ltr 时间从前到后转载 2017-04-09 21:10:29 · 633 阅读 · 0 评论 -
以时间为文件名打包文件
1.时间获取命令date格式: %Y // year 2017 %y // year 17 %m // month %d // day %D // day/month/year %H // hours %M // minute 2.打包tar zcvf `date +%Y%m%d_%H%M`.tar.gz原创 2017-05-15 14:37:54 · 859 阅读 · 0 评论 -
如何按时间来拷贝文件
1.find ~/fileA -mtime -1 -type f -exec cp {} ~/fileB \;//将最近一天fileA中的文件拷贝到fileB中去 2.find ~/fileA -mtime -2 -type f -exec cp {} ~/fileB \;//将最近二天fileA中的文件拷贝到fileB中去注意:不要忘了命令最后的分号转载 2017-04-12 23:39:35 · 2482 阅读 · 0 评论