How to create files in unix?



How to create files in unix?..

Answer / Manoj Kumar Pal

"To create a new file in Unix, you can use the touch command:
`touch filename`nThis will create a new empty file named 'filename'. If 'filename' already exists, it will be overwritten unless it has write permissions denied. To create an empty file with specific permissions, you can use the following command:
`touch -c -m -u username filename && chmod 644 filename`nThis will create a new empty file named 'filename' and change its owner to 'username', and set the permissions to 644 (readable and writable by the owner, read-only for everyone else)."n

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Unix General Interview Questions

i m putting 2.6yrs fake exp in oracle/unix production support i want to know some real time issues,like tell me the challenging issue u ever faced? my project is credit card application plz help me!

1 Answers   Sapient,


How do you change directories in unix?

1 Answers  


How zip the file in unix?

1 Answers  


What are pipes and filters in unix?

1 Answers  


Is unix is a programming language?

1 Answers  


What are the links and symbolic links in a unix file system?

1 Answers  


Is unix a kernel or os?

1 Answers  


How to calculate the number of words in a file?

1 Answers  


What are the pros of executing processes in the background?

1 Answers  


Explain about shell aritmetic operators and functions?

1 Answers   HCL,


If we are terminated at the middle of the program execution in UNIX,what will happen to the program, it will continue running r terminate r the o/p will be send to your mail?

1 Answers   Apps Associates,


What is dev null in unix?

1 Answers  


Categories