1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Linuxのmanコマンドの出力結果をファイルに出力する方法

Last updated at Posted at 2020-02-23

Linuxのmanコマンドの出力結果をファイルに出力する方法を紹介します。

環境

  • OS:CentOS Linux release 7.7.1908
[root@CENTOS7 ~]# cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)
[root@CENTOS7 ~]#

manコマンドの出力結果をファイルに出力(colコマンドで制御文字を除去)

man コマンド | col -bfx > ファイル

[root@CENTOS7 ~]# man top | col -bfx > top.txt
[root@CENTOS7 ~]#

CentOS7では

CentOS7では

man top | col -bfx > top.txt
の結果と
man top > top2.txt
の結果は同じとなりました。

[root@CENTOS7 ~]# man top | col -bfx > top.txt
[root@CENTOS7 ~]# man top > top2.txt
[root@CENTOS7 ~]# diff top.txt top2.txt
[root@CENTOS7 ~]#

以上

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?