umamahesh_nyros

Joined: 17 Jul 2007 Posts: 231 Location: KAKINADA
|
Posted: Mon Jun 01, 2009 5:31 pm Post subject: "cat" command in Unix |
|
|
"cat" is simple and most useful command in Unix
cat is short for conCATenate. It's basically a way to say "read this file, and spit the contents into standard output. It takes a name of one or more text files, and then shows their contents to the standard output as one stream of data.
this command is mainly used to delete log files without interrupting the application.
cat /dev/null > development.log
so, cat dev/null and overwrite the file
with nothing. We have a scripts that routinely cleans up the listener log
files when they reach a certain size, and this is the piece of code that
scripts uses. |
|