#!/bin/bash
# author: ChiWeiming
# version: v1
# date: 2024-03-29
<<COMMANT
有一臺 WEB 伺服器上的目錄,不定時有使用者往該目錄上傳檔案,現在需要每隔 5 分鐘檢查一下是否有新檔案上傳,有的話需要將新檔案的列表輸出到一個按年月日時分的日誌檔案中。
COMMANT
file_suffix=$(date +%Y%m%d%H%M)
dir="/data/web/attachment"
find ${dir} -type f -mmin -5 > /tmp/newf.txt
if [[ -s /tmp/newf.txt ]]; then
/bin/mv /tmp/newf.txt /tmp/${file_suffix}
fi
shell practice 07
相關文章
- shell practice 03
- shell practice 04
- shell practice 05
- shell practice 06
- 07-Shell運算子
- 2018-07-03 adb root/adb shell
- Practice
- linux Shell 命令列-07-func 函式Linux命令列函式
- airflow practiceAI
- scientifically practice DP
- Practice| 流程控制
- Vegetables need more practice.
- yolov5s ncnn practiceYOLOCNN
- [#181024][PAT Practice] A+B FormatORM
- 07年07月07日
- Oracle 12.2 RAC on Linux Best Practice DocumentationOracleLinux
- SAP S4HANA LTMC Practice - the first shot!
- 1003 我要通過!| PAT (Basic Level) Practice
- 07
- Operating Systems: Principles and Practice 2nd ed. Edition
- The practice of high-performance graph computing system Plato in Nebula GraphORM
- PAT (Advanced Level) Practice 1149 Dangerous Goods Packaging (25分)Go
- Practice – iOS 專案持續整合實踐(一)iOS
- Practice - iOS 專案持續整合實踐(一)iOS
- GoCN每日新聞(2018-07-07)Go
- 07索引索引
- java 07Java
- Shell:子shell概念
- PAT (Basic Level) Practice (中文)-1009-說反話 (20分)
- SDNU_ACM_ICPC_2021_Winter_Practice_4th [個人賽]ACM
- 樹洞07
- Day07
- java07Java
- 2024/03/07
- 衝刺07
- 07函式函式
- 07友元
- SpringCloudday07SpringGCCloud