bash script to find old files based off date in file name

前端 未结 4 656
天命终不由人
天命终不由人 2021-02-10 13:15

I\'m developing a bash script that needs to search out files within a single directory that are \"old\" based off a variable that specifies how many days need to pass before the

4条回答
  •  醉梦人生
    2021-02-10 13:54

    If you run the command daily, you could do this:

    echo *-`date -d '8 days ago' '+%F'`.txt
    

    Additional wildcards could be added ofcourse

提交回复
热议问题