LoginSignup
0
0

More than 5 years have passed since last update.

【Bash】現在の日付・時刻を含む形でファイルを作成する

Last updated at Posted at 2016-09-28
  • 年月日まで
touch hoge_`date '+%Y%m%d'`.txt
# => hoge_20161006.txt
  • 年月日時分まで
touch hoge_`date '+%Y%m%d%H%M'`.txt
# => hoge_201610061028.txt
  • 年月日時分秒まで
touch hoge_`date '+%Y%m%d%H%M%S'`.txt
# => hoge_20161006103017.txt
0
0
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
0
0