how to create a new file command

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

you wish to create a link to the /data directory in bob's home directory so you issue the command ln /data /home/bob/datalink but the command fails. What options hould you use in this command line to be successful.

528


Which daemon is used for scheduling of the commands?

558


What are the ms dos commands?

517


How can you copy lines into the buffer in command mode?

542


Write a command that will do the following: -look for all files in the current and subsequent directories with an extension c,v -strip the,v from the result (you can use sed command) -use the result and use a grep command to search for all occurrences of the word orange in the files.

801






What could possibly be the problem when a command that was issued gave a different result from the last time it was used?

515


What make install does?

496


What is ulimit in linux?

552


Which command is used to see the online manual?

598


What are system commands?

553


What is p command?

554


Write a command that will look for files with an extension "c", and has the occurrence of the string "apple" in it.

1145


How do you execute more than one command or program from a single command line entry?

546


How do I run a bash script in linux?

496


What is the command to see on which port which service is running? And what is the difference between /etc/services file and net stat command?

509