09-12-2015, 08:17 PM
cat is a popular command in unix. It has nothing to do with the animal but only maybe the inventors liked writing the name lots of times per day (many people do i think). I dont know but it is possible because they could have called it dog but did not do it. Also many people use cat and in over 40 years noone has tried renaming it to dog or anything else. Only Bill Gates made a cheap copy named type that is worse. Maybe he is alergic to some hair and dont want to be reminded. I dont know but it can be and enough with history now. Here is some useful example of how to use cat:
Basic usage (print some file):
Inform yourself about your CPU:
Write a file without any editor:
Continue write a file without any editor:
Look at garbage (and maybe break terminal):
Get information about your OS:
Inspect your harddisk (only on linux as root and not recommended):
Show every file on your system:
Print message of the day:
If you know some other good usage please post because i like this command very much!
Basic usage (print some file):
Code: (Select All)
cat /path/to/file
Inform yourself about your CPU:
Code: (Select All)
cat /proc/cpuinfo
Write a file without any editor:
Code: (Select All)
cat > /path/to/file
Continue write a file without any editor:
Code: (Select All)
cat >> /path/to/file
Look at garbage (and maybe break terminal):
Code: (Select All)
cat /dev/urandom
Get information about your OS:
Code: (Select All)
cat /etc/issue /proc/version
Inspect your harddisk (only on linux as root and not recommended):
Code: (Select All)
cat $( fdisk -l | grep 'Linux$' | sed 's/ .*//' )
Show every file on your system:
Code: (Select All)
find / -type f -exec cat {} \;
Print message of the day:
Code: (Select All)
cat /etc/motd
If you know some other good usage please post because i like this command very much!