Linux 拆下vim和viminfo的额外管路

Linux 拆下vim和viminfo的额外管路,linux,vim,command-line,Linux,Vim,Command Line,我正在用两个文件做一只猫 1.txt内容: hi everyone 2.txt内容: hi everyone cat 2.txt>>1.txt 1.txt新内容: hi # This viminfo file was generated by Vim 7.2. # You may edit it if you're careful! # Value of 'encoding' when this file was written *encoding=utf-8 ... everyone

我正在用两个文件做一只猫

1.txt内容:

hi
everyone
2.txt内容:

hi
everyone
cat 2.txt>>1.txt

1.txt新内容:

hi
# This viminfo file was generated by Vim 7.2.
# You may edit it if you're careful!

# Value of 'encoding' when this file was written
*encoding=utf-8
...
everyone
它添加了很多我不想要的信息

你能帮我吗

问候


在最后一个文件中处理RHEL 6.4 64

,只需执行以下操作

:g/^#/d
g
这是全球通用的

^#
它将找到以开头的所有行#


d
用于删除

请详细描述您的过程。因为您的问题无法再现。我刚刚编辑了vimrc文件/etc/vimrc,并添加了下一个信息::set viminfo=“”。也许RHEL别名为cat?(听起来很疯狂,但这是我唯一能想到的。)试试
cat--version
/bin/cat 2.txt>>1.txt
。如果您只是尝试
cat 2.txt
,会发生什么情况?要查看
cat
命令的确切功能,请检查
类型cat
的输出。祝你好运