0% found this document useful (0 votes)
104 views

Cat Command

The cat command allows you to view, modify, or combine files. It can display the contents of files, concatenate files, and print text to standard output. Some common options include -n to number lines, -b to omit line numbers on blank lines, and -v to print non-printable characters visibly. The cat command can be used to combine multiple files into one file or redirect output.

Uploaded by

BaSiS GeEk
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
104 views

Cat Command

The cat command allows you to view, modify, or combine files. It can display the contents of files, concatenate files, and print text to standard output. Some common options include -n to number lines, -b to omit line numbers on blank lines, and -v to print non-printable characters visibly. The cat command can be used to combine multiple files into one file or redirect output.

Uploaded by

BaSiS GeEk
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Linux and UNIX cat command help http://www.computerhope.com/unix/ucat.

htm

Linux / Unix cat command

Quick links

About cat
Syntax
Examples
Related commands
Linux / Unix main page

About cat

Allows you to look, modify or combine a file.

Syntax

cat filename [-n] [-b] [-u] [-s] [-v]


filename The name of the file or files that you wish to look at or perform tasks on.

-n Precede each line output with its line number.

-b Number the lines, as -n, but omit the line numbers from blank lines.

-u The output is not buffered. (The default is buffered output.)

-s cat is silent about non-existent files.

-v Non-printing characters (with the exception of tabs, new-lines and form-feeds)


are printed visibly. ASCII control characters (octal 000 - 037) are printed as ^n,
where n is the corresponding ASCII character in the range octal 100 - 137 (@, A,
B, C, . . ., X, Y, Z, [, \, ], ^, and _); the DEL character (octal 0177) is printed ^?.
Other non-printable characters are printed as M-x, where x is the ASCII
character specified by the low order seven bits.

-e A $ character will be printed at the end of each line (prior to the new-line).

-t Tabs will be printed as ^I's and formfeeds to be printed as ^L's.

*If the -v is used -e and -t will be ignored.

Examples

cat file1.txt file2.txt > file3.txt - Reads file1.txt and file2.txt and combines those files to
make file3.txt.

Related commands

ed
pico
tac
tee
touch

1 of 1 12/21/2010 1:56 PM

You might also like