#!/bin/bash
target_dir="/home/douyin/origin"
timestamp=$(date +%s -d "2 days ago")
for file in "${target_dir}"/*
do
    if [[ -f "${file}" && $(date +%s -r "${file}") -lt "${timestamp}" ]]
    then
        rm -f "${file}"
        echo "Deleted file: ${file}"
    fi
done
