2019-04-21 11:50:48 +08:00

40 lines
1.6 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h1 id="rev">rev</h1>
<p>将文件内容以字符为单位反序输出</p>
<h2 id="补充说明">补充说明</h2>
<p><strong>rev命令</strong> 将文件中的每行内容以字符为单位反序输出,即第一个字符最后输出,最后一个字符最先输出,依次类推。</p>
<h3 id="语法">语法</h3>
<pre><code class="language-bash">rev(参数)</code></pre>
<h3 id="参数">参数</h3>
<p>文件:指定要反序显示内容的文件。</p>
<h3 id="实例">实例</h3>
<pre><code class="language-bash">[root@localhost ~]# cat iptables.bak
# Generated by iptables-save v1.3.5 on Thu Dec 26 21:25:15 2013
*filter
:INPUT DROP [48113:2690676]
:FORWARD accept [0:0]
:OUTPUT ACCEPT [3381959:1818595115]
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A OUTPUT -o lo -j ACCEPT
COMMIT
# Completed on Thu Dec 26 21:25:15 2013
[root@localhost ~]# rev iptables.bak
3102 51:52:12 62 ceD uhT no 5.3.1v evas-selbatpi yb detareneG #
retlif*
]6760962:31184[ PORD TUPNI:
]0:0[ TPECCA DRAWROF:
]5115958181:9591833[ TPECCA TUPTUO:
TPECCA j- ol i- TUPNI A-
TPECCA j- 22 tropd-- pct m- pct p- TUPNI A-
TPECCA j- 08 tropd-- pct m- pct p- TUPNI A-
TPECCA j- DEHSILBATSE,DETALER etats-- etats m- TUPNI A-
TPECCA j- pmci p- TUPNI A-
TPECCA j- ol o- TUPTUO A-
TIMMOC
3102 51:52:12 62 ceD uhT no detelpmoC #</code></pre>
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->