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

Explain mount and unmount command.

607


Give the command for finding the current date.

573


What does the metacharacter mean?

604


Write a command to kill the last background job?

610


What is grep r?

580






What are the differences among a system call, a library function, and a unix command?

560


How do you grep recursively?

545


What is merge command in unix?

938


What do chmod, chown, chgrp commands do?

624


What is awk command used for?

594


What does 'mkdir' command do in UNIX?

649


What is the comma to display different lines that are found when compare two files?

587


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

2022


How do I open a port?

579


Is it inbetween or in between?

569