How do you create a file in UNIX

Answer Posted / suchitra

cat > filename
this will create a file adn allows you to enter text and
to come out of the file,press ctrl+d.Then teh file will be
created.

touch command can also be used to create file.but this will
create empty file.

using Vi editor also the files can be created.

and few more editor like "ed" can also be used.
hence there are many ways to create a file in unix.

Is This Answer Correct ?    97 Yes 20 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is grep faster than awk?

555


How do I open a port?

587


What is the use of find command in unix?

575


What is ‘ps’ command for?

610


What is the use of awk command in unix?

573






Is there a way to erase all files in the current directory, including all its sub-directories, using only one command?

792


what is the advaantage of each user having its own copy of the shell?

2030


Name the various commands that are used for the user information in unix.

536


What happens when we execute a unix command?

594


What does this command do? Cat food 1 > kitty

974


How do you repeat a command in terminal?

587


What difference between cmp and diff commands?

717


What is in grep command?

643


What is “chmod” command?

562


What's a command word?

583