how to create a new file command
Answers were Sorted based on User's Feedback
Answer / googler
there are many ways to create new file , out of these two are.
1. create file and write simultanesly using
cat >> "file name" , this command will create file with name
" file name" and allowing you to enter text there itself.
2. create file now , and write in it later using
touch "file name" , this command simply create one file
named " file name" , but laert not prompt you to enter data
there
itself.
| Is This Answer Correct ? | 3 Yes | 6 No |
Answer / v.balaviswanathan
$ cat > filename
to overwrite this we can use
$ cat >> filename
If we want to prevent accidental overwriting we use the command
$ set -o noclobber
and with
$ set +o noclobber
can be done to overwrite a file
| Is This Answer Correct ? | 0 Yes | 4 No |
In my linux machine, i lost /etc/passwd file and /etc/shadow file, then how can i recover it?
What is lsof command in linux?
How to schedule cron backup to run on 4th saturday of month??
What Command used to lock user password?
How do I clear my run history?
What is simple command?
In Linux how you set time a limit on quota?
Which command is used to see the online manual?
How do you change file permissions in Linux?
if i run ls command it will show me the junk output what is problem and how to resolve it
List all the files beginning with A
what is ldd?
7 Answers IBM, Magnum, TCS, Tech Mahindra,