In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Touch command: used to create fil
Mkdir command: used to create folder
Date command: get system time
About the date get system time option
% Y: year% m: month% d: day% H: hour% M: minutes% S: seconds
Example 1:
Create a folder
Mkdir date +% Y%m%d generate folder format YYYYmmdd
[cqs@centos7 data] $mkdir date +% Y%m%d
[cqs@centos7 data] $ls
20190724
Mkdir date +% Y-%m-%d generate folder format YYYY-mm-dd
[cqs@centos7 data] $mkdir date +% Y%m%d
[cqs@centos7 data] $ls
2019-07-24
Mkdir date +% Y%m%d%H%M%s generate folder format YYYYmmddHHMMss
[cqs@centos7 data] $mkdir date +% Y%m%d%H%M%s
[cqs@centos7 data] $ls
2019072413071563946550
Create a file
Touch date +% Y%m%d file format: YYYYmmdd
Touch date +% Y-%m-%d file format: yyyy-mm-dd
If the creation date format is YYYY-mm-dd format, you can use% F to simplify
Mkdir date +% F
[cqs@centos7 data] $mkdir date +% F
[cqs@centos7 data] $ls
2019-07-24
Example 2:
Specified date folder cqs-2019-07-24
[cqs@centos7 data] $mkdir cqs-date +% F
[cqs@centos7 data] $ls
Cqs-2019-07-24
Note: date uses backquotation marks and spaces between date and + symbols.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.