How do you create a file in UNIX

Answers were Sorted based on User's Feedback



How do you create a file in UNIX..

Answer / ps

cat> filename
touch filename

Is This Answer Correct ?    22 Yes 5 No

How do you create a file in UNIX..

Answer / bhaskar

using touch comamnd


touch filename

Is This Answer Correct ?    21 Yes 8 No

How do you create a file in UNIX..

Answer / paramaguru

Touch command is used to create zero byte file.
Cat command is used to create file.

Is This Answer Correct ?    20 Yes 7 No

How do you create a file in UNIX..

Answer / emg

$ cat > file name

Is This Answer Correct ?    22 Yes 11 No

How do you create a file in UNIX..

Answer / naveen kumar

using cat and touch commands in $ prompt.

1. cat <file name> this command is only for creating one
file
2. touch <file names> touch command for creating more than
one file
ex: $touch f1 f2 f3 f4

Is This Answer Correct ?    22 Yes 13 No

How do you create a file in UNIX..

Answer / emg

cat> filename

Is This Answer Correct ?    21 Yes 12 No

How do you create a file in UNIX..

Answer / nilesh

Do by vi editor if u have the vi editor...
or set vi environment...
then type
vi <filename u want to have>
and enter...
...here's ur file got created in the present working
directory! :) :)...

Is This Answer Correct ?    18 Yes 10 No

How do you create a file in UNIX..

Answer / asit pal

vi filename.extension

Is This Answer Correct ?    11 Yes 3 No

How do you create a file in UNIX..

Answer / dinesh

cat >file name
OR
touch file name

Is This Answer Correct ?    16 Yes 10 No

How do you create a file in UNIX..

Answer / shiva ram prasad

there are many ways to create a file in unix like
1)cat
2)touch
3)vi
4)tee
for eg to create a file using cat is
$cat > filename
hi how r u
n hit ctrl+d to save n quit

Is This Answer Correct ?    6 Yes 0 No

Post New Answer

More Unix Commands Interview Questions

what is the command to list files in a directory in UNIX?

8 Answers  


What is the difference between cat and more command?

0 Answers  


What are the commands in UNIX to list the files in a Directory?

0 Answers   CGI,


Why is shebang used?

0 Answers  


Sorry to all Technical person for mistake of Question. Now i am post currect question Why copied file permission is changed in destination. When i give all permission i.e 777 to file and copy that to other location in destination the permission is 755. But if give permission 555 in destination that file permission is 555 and if give permission 444 to file after copy in destination the file permission is 444. These all are happening in normal user. How the umask value is calculate here really i am not understand. Please write the proper answer. Thanks in Advance

3 Answers   TCS,






What is use of sed command?

12 Answers   BitWise, Infosys, Reliance,


What are filter commands in unix?

0 Answers  


Is ‘du’ a command? If so, what is its use?

0 Answers  


When i run a programm of orphan process. Instead of getting child's parent (ppid)=1 ..i get 1400 and it varies as per system. How can i findthe right soluion??? My pgm: #include<stdlib.h> # include <stdio.h> int main() { int pid; pid=fork(); if(pid < 0) {exit(-1);} else if(pid==0) { printf("Child Process is Sleeping ..."); sleep(10); printf("Orphan Child's Parent ID : %u ",getppid()); } else { printf("Parent Process Completed ... %u ",getpid()); exit(0); } return 0; } Output:

0 Answers  


what is the command to find out the difference between files and folders?

6 Answers  


boot process?

2 Answers   Atos Origin, Wipro,


Who invented grep?

0 Answers  


Categories