Hot search terms: 360 Security Guard Office365 360 browser WPS Office iQiyi Huawei Cloud Market Tencent Cloud Store
operating system Storage: 1158720KB Time: 2014-04-22
Software Introduction: Ubuntu is a freely distributed and open source Linux-based operating system designed for humans, humans who have no previous experience with Linux...
In the Linux system, some characters are not displayed when viewed with an ordinary text editor. This requires the use of the cat command to view. The following is a tutorial on how to use the cat command to display hidden characters in Linux, which grasps the technical points. , it is much easier to learn. Hurry up and follow the Huajun editor to take a look! .
First, we create a simple text file and write some special characters. Open a terminal and run the command:
printf ‘testing 12 11 11testing 14 10 12more testing 12 11 00 13 00even more testing 12 11 11 11 12’ 》 /tmp/testing.txt
Now open it with different editor software, the displayed results will be different. Opening with a simple cat will show:
$ cat /tmp/testing.txt
testing
testing
more testing
even more testing
If you open it with nano or vim, you will see:
testing
testing^L^H
more testing
^@^K^@even more testing
Now we add some options to cat so that special characters can be displayed.
Use the cat -T command to display the TAB key character ^I
cat -T /tmp/testing.txt
testing
^I^Itesting
more testing
^I
even more testing
^I^I^I
Use the cat -E command to display the ending character $ at the end of the line
$ cat -E /tmp/testing.txt
testing$
testing
$
more testing$
even more testing$
$
All invisible characters can be displayed with a simple cat -A command:
$ cat -A /tmp/testing.txt
testing$
^I^Itesting^L^H$
more testing$
^I^@^K^@even more testing$
^I^I^I$
The above is the editor’s summary of how to use the cat command to display hidden characters in Linux. In addition to displaying invisible characters, the cat command has other functions. For details, please refer to System Home. How to use the cat command in Linux?
How does Tencent Computer Butler conduct a comprehensive physical examination? How does Tencent Computer Butler conduct a comprehensive physical examination?
How does the universal Wubi input method display typing speed? -How to display typing speed using the universal Wubi input method
How to hide the status bar in the universal Wubi input method? -How to hide the status bar with the universal Wubi input method
How to input special symbols using the universal Wubi input method? -How to input special symbols using the universal Wubi input method
How to set the skin for the universal Wubi input method? -How to set skin for universal Wubi input method
What to do if there is no sound after reinstalling the computer system - Driver Wizard Tutorial
How to practice typing with Kingsoft Typing Guide - How to practice typing with Kingsoft Typing Guide
How to upgrade the bootcamp driver? How to upgrade the bootcamp driver
How to change QQ music skin? -QQ music skin change method
Driver President Download-How to solve the problem when downloading driver software is very slow