cat
英[kæt] 美[kæt]
n.Cat; feline; vicious woman; jazz lover
vt. Hang (anchor) on the anchor frame;
Third person singular: cats Plural: cats Present participle: catting Past tense: catted Past participle: catted
Linux cat command syntax
Function:The cat command is used to connect files and print to the standard output device.
Permissions:All users
Syntax:cat [-AbeEnstTuv] [--help] [--version] fileName
Linux cat command example
Add the line number to the document content of textfile1 and enter it into the textfile2 document:
cat -n textfile1 > textfile2
Add the line number to the document content of textfile1 and textfile2 (blank lines are not added) and append the content to the textfile3 document:
cat -b textfile1 textfile2 >> textfile3
Clear /etc/test.txt Document content:
cat /dev/null > /etc/test.txt
cat can also be used to make image files. For example, if you want to make an image file of a floppy disk, put the floppy disk away and enter:
cat /dev/fd0 > OUTFILE
On the contrary, if you want to write the image file to the floppy disk, enter:
cat IMG_FILE > /dev/fd0