• Increase font size
  • Default font size
  • Decrease font size
cat

Linux /Unix : Cat

Usage: cat [OPTION] [FILE]...

Concatenate FILE(s), or standard input, to standard output.

 

  -A, --show-all           equivalent to -vET

  -b, --number-nonblank    number nonblank output lines

  -e                       equivalent to -vE

  -E, --show-ends          display $ at end of each line

  -n, --number             number all output lines

  -s, --squeeze-blank      never more than one single blank line

  -t                       equivalent to -vT

  -T, --show-tabs          display TAB characters as ^I

  -u                       (ignored)

  -v, --show-nonprinting   use ^ and M- notation, except for LFD and TAB

      --help     display this help and exit

      --version  output version information and exit

 

With no FILE, or when FILE is -, read standard input.

 

Examples:

  cat f - g  Output f's contents, then standard input, then g's contents.

  cat        Copy standard input to standard output.


 

 

 Most of the hardware information can be extracted from /proc file system, for example display CPU and Memory information, enter:
cat /proc/meminfo
cat /proc/cpuinfo

 

[root@HCMRTG_BY_YaoBin ~]# cat /proc/meminfo

MemTotal:      3500784 kB

MemFree:        127428 kB

Buffers:         68472 kB

Cached:        3065788 kB

SwapCached:          0 kB

Active:         762384 kB

Inactive:      2547700 kB

HighTotal:     2621232 kB

HighFree:         5368 kB

LowTotal:       879552 kB

LowFree:        122060 kB

SwapTotal:      779112 kB

SwapFree:       779032 kB

Dirty:           30616 kB

Writeback:         372 kB

AnonPages:      175812 kB

Mapped:          17244 kB

Slab:            52968 kB

PageTables:       2212 kB

NFS_Unstable:        0 kB

Bounce:              0 kB

CommitLimit:   2529504 kB

Committed_AS:   419104 kB

VmallocTotal:   114680 kB

VmallocUsed:      2552 kB

VmallocChunk:   111944 kB

HugePages_Total:     0

HugePages_Free:      0

HugePages_Rsvd:      0

Hugepagesize:     4096 kB

 

[root@HCMRTG_BY_YaoBin ~]# cat /proc/cpuinfo

processor       : 0

vendor_id       : GenuineIntel

cpu family      : 15

model           : 4

model name      : Intel(R) Xeon(TM) CPU 3.00GHz

stepping        : 10

cpu MHz         : 3000.370

cache size      : 2048 KB

physical id     : 0

siblings        : 2

core id         : 0

cpu cores       : 1

fdiv_bug        : no

hlt_bug         : no

f00f_bug        : no

coma_bug        : no

fpu             : yes

fpu_exception   : yes

cpuid level     : 5

wp              : yes

flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lm constant_tsc pni monitor ds_cpl cid cx16 xtpr lahf_lm

bogomips        : 6003.78

 

processor       : 1

vendor_id       : GenuineIntel

cpu family      : 15

model           : 4

model name      : Intel(R) Xeon(TM) CPU 3.00GHz

stepping        : 10

cpu MHz         : 3000.370

cache size      : 2048 KB

physical id     : 0

siblings        : 2

core id         : 0

cpu cores       : 1

fdiv_bug        : no

hlt_bug         : no

f00f_bug        : no

coma_bug        : no

fpu             : yes

fpu_exception   : yes

cpuid level     : 5

wp              : yes

flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lm constant_tsc pni monitor ds_cpl cid cx16 xtpr lahf_lm

bogomips        : 5999.40

 

processor       : 2

vendor_id       : GenuineIntel

cpu family      : 15

model           : 4

model name      : Intel(R) Xeon(TM) CPU 3.00GHz

stepping        : 10

cpu MHz         : 3000.370

cache size      : 2048 KB

physical id     : 3

siblings        : 2

core id         : 0

cpu cores       : 1

fdiv_bug        : no

hlt_bug         : no

f00f_bug        : no

coma_bug        : no

fpu             : yes

fpu_exception   : yes

cpuid level     : 5

wp              : yes

flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lm constant_tsc pni monitor ds_cpl cid cx16 xtpr lahf_lm

bogomips        : 5999.43

 

processor       : 3

vendor_id       : GenuineIntel

cpu family      : 15

model           : 4

model name      : Intel(R) Xeon(TM) CPU 3.00GHz

stepping        : 10

cpu MHz         : 3000.370

cache size      : 2048 KB

physical id     : 3

siblings        : 2

core id         : 0

cpu cores       : 1

fdiv_bug        : no

hlt_bug         : no

f00f_bug        : no

coma_bug        : no

fpu             : yes

fpu_exception   : yes

cpuid level     : 5

wp              : yes

flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lm constant_tsc pni monitor ds_cpl cid cx16 xtpr lahf_lm

bogomips        : 5999.47

 

 

 

 Linux CPU information is store in /proc/cpuinfo, we can check our Linux CPU information by issue following command

#cat /proc/cpuinfo

[root@localhost ~]# cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 15
model name      : Intel(R) Core(TM)2 Duo CPU     E4600  @ 2.40GHz
stepping        : 8
cpu MHz         : 2391.677
cache size      : 2048 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss nx constant_tsc pni ds_cpl
bogomips        : 4792.43
 

 How to check CPU information on Linux

 
using command line type
Intel(R) Xeon(TM) CPU 3.00
 
[root@whatislinux.net ~]# cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model name      : Intel(R) Xeon(TM) CPU 3.00GHz
stepping        : 10
cpu MHz         : 3000.370
cache size      : 2048 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 1
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lm constant_tsc pni monitor ds_cpl cid cx16 xtpr lahf_lm
bogomips        : 6003.78
 
processor       : 1
vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model name      : Intel(R) Xeon(TM) CPU 3.00GHz
stepping        : 10
cpu MHz         : 3000.370
cache size      : 2048 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 1
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lm constant_tsc pni monitor ds_cpl cid cx16 xtpr lahf_lm
bogomips        : 5999.40
 
processor       : 2
vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model name      : Intel(R) Xeon(TM) CPU 3.00GHz
stepping        : 10
cpu MHz         : 3000.370
cache size      : 2048 KB
physical id     : 3
siblings        : 2
core id         : 0
cpu cores       : 1
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lm constant_tsc pni monitor ds_cpl cid cx16 xtpr lahf_lm
bogomips        : 5999.43
 
processor       : 3
vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model name      : Intel(R) Xeon(TM) CPU 3.00GHz
stepping        : 10
cpu MHz         : 3000.370
cache size      : 2048 KB
physical id     : 3
siblings        : 2
core id         : 0
cpu cores       : 1
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lm constant_tsc pni monitor ds_cpl cid cx16 xtpr lahf_lm
bogomips        : 5999.47
 

 print the contents of a text file onto the screen

 

NAME

       cat - concatenate files and print on the standard output

SYNOPSIS

       cat [OPTION] [FILE]...

DESCRIPTION

       Concatenate FILE(s), or standard input, to standard output.

       -A, --show-all

              equivalent to -vET

 

       -b, --number-nonblank

              number nonblank output lines

       -e     equivalent to -vE

       -E, --show-ends

              display $ at end of each line

       -n, --number

              number all output lines

       -s, --squeeze-blank

              never more than one single blank line

       -t     equivalent to -vT

       -T, --show-tabs

              display TAB characters as ^I

       -u     (ignored)

       -v, --show-nonprinting

              use ^ and M- notation, except for LFD and TAB

       --help display this help and exit

       --version

              output version information and exit

       With no FILE, or when FILE is -, read standard input.

 

 
[root@www.whatislinux.net]# cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model name      : Intel(R) Xeon(TM) CPU 3.00GHz
stepping        : 10
cpu MHz         : 3000.370
cache size      : 2048 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 1
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
Read more...  

Login Form