CentOS Linux Server Guide

Centos Linux Files and Directories

Creating Files

 

There are 3 command you can create new files.

 
command Description
touch touch [option] [filename]

Example:

touch test.txt

 

cat cat  [option] [filename] > filename

Note: Cat command is not really create new files but is to export one file's content to another file

Example:

cat A.txt > B.txt

This will export/output of A.txt's content to B.txt

 

echo echo [option] [strings] > filename

Note: echo will redirect [strings] input to a file . The > symbol is the redirect symbol

Example: 

echo Welcome to CentOS > welome.txt

 

 

 

Back to Files and Directories



Copyright 2011 http://www.1a-centosserver.com All Rights Reserved

All trademarks are the property of their respective owners.

Contact Us | Terms of Use | Privacy Policy