LoginSignup
2
1

More than 5 years have passed since last update.

シェルスクリプトでファイル名に日付_時間を付けてコピーする

Posted at

シェルスクリプト内で、ファイル名に日付をつけてコピーしたい。
更に一日に何回も実行するかもしれないから時間もつけたい。
そんな時の自分用のメモ

cp -p a.txt a.txt.`date "+%Y%m%d_%H%M%S"`
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1