Get the App
SLTechnology News&Howtos  ›  Servers  › 

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

Shulou Source: shulou.com Published: 2022-06-02 01:56:21 11月16日 Update

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.

Tags: File output command equivalence content parameter article help standard device information interest preface character that is screen file name friend format question Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Microsoft Shulou Information NVidia Shulou Technology