When wget is used for download, the wget download progress bar is abnormal and cannot be displayed in one row. it turns into a multi-line display of the pitfalls. a new row is automatically generated for wget in each cycle, as a result, the download progress is slow, and the entire screen is full of wget progress bars in a short time.
In order to solve the problem of garbled characters after the Putty client is connected to CentOS, after LANG = zh_CN.UTF-8 is set, wget download progress bar is abnormal when wget is used, it cannot be displayed on one line, it turns into a multi-line display of the potholes. wget will automatically generate a new line for each cycle, and the results will be downloaded slowly. the whole screen will be full of wget progress bars in a short time.
Copy codeThe code is as follows:
The progress bar of wget has become a miserable screen killer. the full screen is like the following... (no. = is omitted)
99% [============================================== ====>] 10,416,337 6.09 K/s eta (central UK time
99% [============================================== ====>] 10,419,241 6.10 K/s eta (central UK time
99% [============================================== ====>] 10,419,241 5.73 K/s eta (central UK time
99% [============================================== ====>] 10,425,049 5.79 K/s eta (central UK time
99% [============================================== ====>] 10,427,953 5.65 K/s eta (central UK time
100% [============================================== ====>] 10,431,288 5.65 K/s in 27 m 12 s
This is totally different from the progress bar of the original line. It was later discovered that this was because, during the translation, eta was converted to eta (central UK time), resulting in a long output and a broken line. as a result, the next output must start from a new line.
Later, I found that many people on the Internet had this problem. The key was that the problem had existed since a long time ago and it was still quite fast to modify.
Copy codeThe code is as follows:
# Note that the file path is/usr/share/locale/zh_CN/LC_MESSAGES/
Cd/usr/share/locale/zh_CN/LC_MESSAGES/
# Rename first
Mv wget.mo. bak
# Replace eta (central UK time) with ETA from the renamed File and export the new file
Msgunfmt wget.mo. bak-o-| sed's/eta (central UK time)/ETA/'| msgfmt--o wget.mo
TIPs:
1. if msgunfmt and msgfmt are not available, install gettext (you have not found the method for installing msgunfmt and msgfmt directly ).
2. the above commands are operated by the root user.