Copying the files based on modification date in linux

后端 未结 5 397
小蘑菇
小蘑菇 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:28

    Ex: select day 09/08/2017

    ls -l
     -rw-rw-rw-    1    root     system          943   Aug   09   02:59  File
    
    for j in `ls -l |awk '{ if ($7 == "09") print $9}'`
        do
            mv $j $Destination;
        done
    

提交回复
热议问题