关于 man ls > 1.txt 乱码的解决

来源:互联网 发布:qt 信号 传递数组 编辑:程序博客网 时间:2024/05/20 00:12

# man ls > 1.txt

#vim 1.txt

LS(1)                           User Commands                           LS(1)

 

N^HNA^HAM^HME^HE
       ls - list directory contents

S^HSY^HYN^HNO^HOP^HPS^HSI^HIS^HS
       l^Hls^Hs [_^HO_^HP_^HT_^HI_^HO_^HN]... [_^HF_^HI_^HL_^HE]...

D^HDE^HES^HSC^HCR^HRI^HIP^HPT^HTI^HIO^HON^HN
       List  information  about the FILEs (the current directory by default).
       Sort entries alphabetically if none of -^H-c^Hcf^Hft^Htu^HuS^HSU^HUX^HX nor
-^H--^H-s^Hso^Hor^Hrt^Ht.

       Mandatory arguments to long options are mandatory  for  short  options
       too.

       -^H-a^Ha, -^H--^H-a^Hal^Hll^Hl
              do not hide entries starting with .

 

出现乱码

 

解决方法:

#man ls | col -b | cat > 1.txt

 

原创粉丝点击