In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Most people do not understand the knowledge points of this article "Linux how to query large files", so the editor summarizes the following contents, detailed contents, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "Linux how to query large files" article.
1. The query results of find /-type f-size + 1G files larger than 1G in the query server are as follows:
[root@localhost] # find /-type f-size + 1G / var/lib/mysql/darkindustry/tbl_jm_account.ibd / var/lib/mysql/tase1/key_timing_3.ibd / var/lib/mysql/tase1/news_info_bak_1.MYD / var/lib/mysql/mysql-bin.000001 / var/lib/mysql/aasl/7_quanliang_changeLocation.ibd / var/lib/mysql/jiema/tbl_account_pay_record.ibd / var/log/mysqld.log The command / home/local/mycat/logs/wrapper.log queries all files larger than 1G in size from the "/" root directory. The size of the query can be changed as needed, as follows:
Related query: query files greater than 100m in the server
Find /-type f-size + 100M2, query the files greater than 1G in the server and the command for attribute information are as follows. When querying files larger than 1G, the creator, size (in b), modification date and path are displayed.
Find /-type f-size + 1G-print0 | xargs-0 ls-l query result is as follows:
[root@localhost ~] # find /-type f-size + 1G-print0 | xargs-0 ls-l-rw-r--r--. 1 root root 5777129059 March 17 16:29 / home/local/mycat/logs/wrapper.log-rw-. 1 root root 1214541824 February 20 2020 / usr/local/apache-tomcat-7.0.79/bin/core.32402-rw-r-. 1 mysql mysql 1157627904 December 19 10:48 / var/lib/mysql/aasl/7_quanliang_changeLocation.ibd-rw-r-. 1 mysql mysql 1119879168 April 15 2020 / var/lib/mysql/darkindustry/tbl_jm_account.ibd-rw-r-. 1 mysql mysql 14726201344 March 17 13:54 / var/lib/mysql/jiema/tbl_account_pay_record.ibd-rw-r-. 1 mysql mysql 1379945102 July 6 2020 / var/lib/mysql/mysql-bin.000001-rw-r-. 1 mysql mysql 5469372416 March 17 16:21 / var/lib/mysql/tase1/key_timing_3.ibd-rw-r-. 1 mysql mysql 2468393172 Jan 2 2020 / var/lib/mysql/tase1/news_info_bak_1.MYD-rw-r--r--. 1 mysql mysql 1859491887 March 17 16:12 / var/log/mysqld.log3, query and sort large files. Here, use du-h to display only the file size and path. To view details, change du-h to ls-l.
Find /-type f-size + 1G-print0 | xargs-0 du-h | the query result of sort-nr is as follows:
[root@localhost ~] # find / var/-type f-size + 1G-print0 | xargs-0 du-h | sort-nr 14G / var/lib/mysql/jiema/tbl_account_pay_record.ibd 5.4G / home/local/mycat/logs/wrapper.log 5.1G / var/lib/mysql/tase1/key_timing_3.ibd 2.3G / var/lib/mysql/tase1/news_info_bak_1.MYD 1.8G / var/log/mysqld.log 1.3G / var/lib/mysql/mysql-bin.000001 1.1g / var/lib/mysql/darkindustry/tbl_jm_account.ibd 1.1g / var/lib/mysql/aasl/7_quanliang_changeLocation.ibd like the above log log size of several gigabytes We usually change the configuration optimization or empty it, we usually use the echo "" > / var/log/mysqld.log command to clear it.
The above is about the content of this article on "how to query large documents in Linux". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more related knowledge, please pay attention to the industry information channel.
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.