Copying the files based on modification date in linux

后端 未结 5 396
小蘑菇
小蘑菇 2021-02-02 11:13

It may be a duplicate question but i could not find the solution for this i want to copy a last 3 months files from one directory to another directory but i could find only to l

5条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-02 11:29

    Use this command:

    for i in `ls -lrt | grep "jul" | awk '{print $9}' `; do cp $i* /some/folder/; done
    

提交回复
热议问题