Skip to content

Kyle's Code Blog – KodeLAB

程式筆記、開發心得、個人部落格

  • 首頁
  • 分類目錄
  • 關於本站
  • 隱私權政策

標籤: Batch

  • Home
  • Batch
  • Linux應用
  • 應用教學

使用Linux Bash或是Windows Batch產生當前日期的檔案名稱

透過定時執行腳本完成一些自動化的工作,常常會需要使用時間來命名一些檔案。例如我想要一個檔案名稱是透過現在的日期產生的,同時包含年月日時分秒,像是「log_20220628_123000.txt」,該如何透過Linux腳本或是Windows腳本自動產生呢?本文將教學Linux與Windows各自的產生方式。

6 月 283 月 11

近期文章

  • macOS SSH 連線 Claude Code 顯示未登入|keychain 未解鎖解法
  • Harness Engineering|AI Agent 從提示詞工程、上下文工程演進的新顯學
  • Playwright CLI 教學|搭配 Claude Code 的瀏覽器自動化實戰
  • Anthropic 免費送禮!Claude 額外用量額度教學|Pro、Max、Team 方案免費 Credit 一次搞懂
  • iOS Safari Canvas 觸控事件踩坑紀錄|React Pointer Events 與 preventDefault 實戰

熱門標籤

Agent AI Anthropic Apple Automation Browser Claude Claude Code Cloud Context Engineering Debian Docker E2E GCP Gemma GitHub Harness Engineering iOS Java JavaScript Keychain Linux LLM macOS MariaDB Markdown MarkItDown Mermaid MongoDB MySQL Nginx Ollama Parcel Playwright Python RAG React Spring SSH Swift tmux TypeScript Ubuntu VM Windows

彙整

  • 2026 年 4 月
  • 2026 年 3 月
  • 2026 年 2 月
  • 2025 年 11 月
  • 2025 年 10 月
  • 2025 年 9 月
  • 2023 年 5 月
  • 2023 年 4 月
  • 2023 年 3 月
  • 2023 年 2 月
  • 2023 年 1 月
  • 2022 年 11 月
  • 2022 年 10 月
  • 2022 年 9 月
  • 2022 年 8 月
  • 2022 年 7 月
  • 2022 年 6 月
  • 2022 年 5 月

分類

  • AI應用 (9)
  • JavaScript教學 (6)
  • Java教學 (15)
  • Linux應用 (16)
  • Swift基礎教學 (1)
  • 前端開發 (1)
  • 應用教學 (34)
  • 日常生活 (3)
  • 未分類 (1)
  • 程式語言 (24)
  • 綜合 (12)
  • 資料庫教學 (8)
  • 雲端應用 (4)

Copyright © 2022-2026 Kyle's Code Blog – KodeLAB | Theme: Moral Magazine Lite By Moral Themes.