How do you create a file in UNIX
Answers were Sorted based on User's Feedback
Answer / rakesh bagaria
1. using cat: cat>filename
2. using touch: touch filename (used basically for time stamping)
3. vi filename (exit using :wq)
4. echo>filename
Is This Answer Correct ? | 5 Yes | 1 No |
Answer / pawan
to create the file using this command..
$ cat > filename
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / khaja.shaik
To create files in unix there are two processes are there.
They are..
1)cat command
which creates a new file. If the file is already exists
it overrides the contents. It occupies memory.
2)touch command
Which creates a new empty file for later use.
Is This Answer Correct ? | 7 Yes | 4 No |
Answer / kanta harikrishna
by using touch command we can create an empty file:
syntax:touch <file-name>
by using cat command.......
syntax:cat ><file-name>
by using vi editor.......
syntax:vi <file-name>
(or)
><file-name>
Is This Answer Correct ? | 7 Yes | 4 No |
Answer / gramper
We can create empty file by using the command
$ touch filename
Adding contents to an empty file
$ cat >>filename
- writing any contents
-ctl + d
$ cat filename
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / vi
We can create empty file by using the command true or :
: > testfile1
(or)
true > testfile2
The above two examples will create files.
Is This Answer Correct ? | 6 Yes | 4 No |
Answer / july
first open start button then go to putty click there then it will be opened then it starts like this
na peru pipparmentu na volanta currentu na shape e truppetu
na soke bulletu
please give me rating for this
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / pehaaa
by using touch command, but the size of the file is zero
byte & cat command is used to create file and to store few
lines in it.
Is This Answer Correct ? | 1 Yes | 1 No |
Answer / kamini
touch <filename>
cat > filename
or use vi editor to create a file
Is This Answer Correct ? | 0 Yes | 0 No |
What is the output of : $ ps-e $ ps-a commands
What is the use of sed command in unix?
How do you move a process which is running background to foreground?
Which command should you use to find the remaining disk space in unix server?
What is the difference between AWK and SED commands? Plz give example and explain...
how many internal commands is there in UNIX?
What is the different between UNIX command and UNIX shell script?
What Is the command to change a file's creation time. means one file is created at the time 15:19 then time should br changed to 14:14
Why is it called grep?
What is the difference between pipe (|) and tee command in unix
What is the use of tee command?
Write a command that will output the sorted contents of a file named in.txt and place the output in another file named out.txt, while at the same time excluding duplicate entries.