Linux (centos7) file related operations

Linux (centos7) file related operations


Merge files

Put the files you want to merge in a folder, and then use the following command
cat * > 新文件的路径(不要和你要合并的文件放在同一个文件夹里)

File transcoding

Iconv command to convert the file encoding:
iconv -f 原编码 -t 新编码 filename
prompt
some encoding format that is not supported can spread to the local Windows, go into Windows Notepad to try
such as
the original file encoding format
Insert picture description here
saved as
Insert picture description here
too choose the encoding you want Save
Insert picture description here
comparative
Insert picture description here
Then put your UTF-8 encoded files should be displayed normally when uploaded to centos

Published 318 original articles · Like 44 · Visitors 20,000+

Guess you like

Origin blog.csdn.net/qq_43594119/article/details/105603982