In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
Touch command is a very common command to create text, many people tend to ignore its parameters, and its parameter function is still very useful.
Touch command parameters
-an or-- time=atime or-- time=access or-- time=use changes the read time record of the file.
-c or-- no-create does not create any documentation.
-d uses the specified date time instead of the current time.
-f this parameter is ignored and not processed, and is only responsible for resolving the compatibility issue of the BSD version of the touch directive.
-m or-- time=mtime or-- time=modify changes the modification time of the file.
-r set the date and time of the specified document or directory to the same date and time as the reference document or directory.
-t uses the specified date time instead of the current time
Example:
1. Create a file
# touch a.txt
(ls-- full-time)
-rw-r--r-- 1 svnuser svnuser 0 2015-04-21 10 purl 45 a.txt 39.141783261 + 0800
2. Modify the time when the file was created and last modified
# touch-t 201404200900 a.txt
-rw-r--r-- 1 svnuser svnuser 0 2014-04-20 09 a.txt 00.000000000 + 0800 a.txt
3. Modify the time of the specified file to be the same as another file
# touch-r a.txt b.txt / / change the file modification time of b.txt to the same as that of a.txt file
-rw-r--r-- 1 svnuser svnuser 0 Apr 21 10:53 a.txt
-rw-r--r-- 1 svnuser svnuser 0 Apr 21 10:53 b.txt
4. B.txt time can be modified by am,pm or 24-hour time system.
# touch-d "6:03pm" b.txt
-rw-r--r-- 1 svnuser svnuser 0 2015-04-21 18 purl 03purl 00.000000000 + 0800 b.txt
5. Create an empty file
# touch-c c.txt
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.