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

Cat commands under linux connect files and print them to standard output devices

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Preface

The cat command is used to connect files and print them to a standard output device (screen or > fileName to another file). The following article will describe this command in more detail.

Command classification: file management

Cat syntax format

Cat [parameter] [file name] cat [- AbeEnstTuv] [--help] [--version] fileName

Parameters.

-A,-- show-all is equivalent to-vET-b,-- number-nonblank for non-empty output line numbers-e is equivalent to-vE-E,-- show-ends displays $- n at the end of each line,-- number pairs for all output line numbers-s,-- squeeze-blank does not output multiline blank lines-t is equivalent to-vT-T,-- show-tabs displays jump characters as ^ Ilyu (ignored)-v -- show-nonprinting uses ^ and M-references Except for LFD and TAB-- help displays this help and leaves

Example

Display the entire file at once and add a line number

Cat-n config.js

Create a file from the keyboard (only files can be created, not edited)

Cat > newFile

Several files are merged into one file

Cat file1 file2 > newFile

Summary

The above is the whole content of this article, I hope that the content of this article can bring some help to your study or work, if you have any questions, you can leave a message and exchange, thank you for your support.

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

Servers

Wechat

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

12
Report