How to Use Cat Command on Dedicated Server?

The “catcommand allows you to read /view the contents of the text files without editing them. The easiest method of reading a file is to use the “cat” command followed by the particular filename.

 

Please refer the below example:

 

cat logfile.txt

 

You can also append “less” to the output, in order to check the file page by page.

 

See the below example:

 

cat logfile.txt | less

It is also possible to save the output contents in a file and download,

so that you can check it offline.

To do this, simply type “cat” followed by an output redirection operator.

cat /proc/cpuinfo > /home/user/cpu-information.txt

The “cat” command can also be used to link multiple files together.

If you want to combine files, the best procedure is as follows:

See the below example:

cat myfile1 myfile2 myfile3

When you fire the above command, it will display the output contents on your screen,

which you can send to a file to download.

cat myfile1 myfile2 myfile3 > output.txt

  • 61 Users Found This Useful
這篇文章有幫助嗎?

相關文章

Can I use my domain name or must I use my IP address as the hostname for FTP?

Using your IP address (192.168.22.22  is an example IP address) is the preferred entry for...

Can you transfer my sites from my current host to my new VPS?

Yes. We will transfer all of your sites free* of charge and will assure that you experience no or...

Do you allow MP3 files? Do you allow streaming of videos?

Yes we do with our special plans at http://hostripples.in/avs-hosting.php

Do you support Cold Fusion?

We do not support or Cold Fusion on our shared hosting servers, however you are more than welcome...