In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Linux how to view the initial creation time of the file, I believe that many inexperienced people do not know what to do, so this article summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.
The file creation time in the Linux system is stored in the inode of the ext4 file system. So how do you see when the file was originally created?
Step 1: find the inode file number
First, use the following command on the terminal to find the inode number of any file.
$ls-I / var/log/ secure`13377 / var/log/syslog step 2: find the file creation time (crtime)
After getting the inode number of the file, use the debugfs command with inode number statistics to follow the disk path.
$debugfs-R ``'stat'``/ dev/ sda``1 execution
$debugfs-R 'stat' / dev/sda1 debugfs 1.41.12 (17-May-2010) Inode: 13377 Type: regular Mode: 0600 Flags: 0x80000 Generation: 2326794244 Version: 0x00000000:00000001 User: 0 Group: 0 Size: 223317 File ACL: 0 Directory ACL: 0 Links: 1 Blockcount: 440 Fragment: Address: 0 Number: 0 Size: 0 ctime: 0x5230b7ae:55efa068-Thu Sep 12 00:04:22 atime: 0x5230b7ae:55efa068-Thu Sep 12 00:04:22 2013 mtime: 0x5230b7ae:55efa068-Thu Sep 12 00:04:22 2013 crtime: 0x4eeacc8a:0948eb58-Fri Dec 16 10:13:54 2011 Size of extra inode fields: 28 Extended attributes stored in inode body: selinux = "system_u:object_r:var_log_t:s000" (31) EXTENTS: (0-24): 35008-35032 (25-54): 164224-164253 find the entry for crtime in the output above This is the actual file creation time.
What is Linux system Linux is a free-to-use and free-spread UNIX-like operating system, is a POSIX-based multi-user, multi-task, multi-threaded and multi-CPU operating system, using Linux can run major Unix tools, applications and network protocols.
After reading the above, have you mastered the method of how to view the original creation time of the file in Linux? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
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.