Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the use of the rev command in Linux

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article is to share with you about the use of the rev command in Linux. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Linux common command rev command outputs each line in the file in reverse order in characters, that is, the first character is the last, the last character is the first, and so on

Rev outputs the contents of the file in reverse order in characters.

Syntax rev (parameter) parameter file: specifies the file to display the contents in reverse order.

Example [root@localhost ~] # cat iptables.bak # Generated by iptables-save v1.3.5 on Thu Dec 26 21:25:15 2013 * filter: INPUT DROP [48113Generated by iptables-save 2690676]: FORWARD accept [0:0]: OUTPUT ACCEPT [3381959Generated by iptables-save 1818595115]-An INPUT-I lo-j ACCEPT-An INPUT-p tcp-m tcp-dport 22-j ACCEPT-An INPUT-p tcp-m tcp-dport 80-j ACCEPT-An INPUT-m state-state RELATED- ESTABLISHED-j ACCEPT-An INPUT-p icmp-j ACCEPT-An 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 [PORD TUPNI:] 0:0 [TPECCA DRAWROF:] 51159581833 [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 # Thank you for reading! This is the end of this article on "what is the use of rev commands in Linux?". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report