LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Simple Commands (https://www.linuxquestions.org/questions/linux-newbie-8/simple-commands-169786/)

jackel 04-13-2004 07:51 PM

Simple Commands
 
I am very new to linux, but I have been able to do alot so far. This may be a stupid question, but how do I create a new file. I have looked at many sites with a list of commands, but I can't seem to find a very simple command to create a new file.

I am trying to do this: add a file named swat in your /etc/xinetd.d directory

How do I add a file, I have looked at many commands, but none say how to just create a new file.

Sorry for the dumb question...

DrOzz 04-13-2004 07:55 PM

you can just open a text editor and when your done adding
its contents, you can just save the file as "swat" in that directory.

or if you want to create the empty file before adding anything you can
type :
touch swat
within the folder you want the file to be located.

jackel 04-13-2004 07:58 PM

oh, text editor, seems so simple now... Thanx

itsme86 04-13-2004 11:43 PM

If the file just needs to be present you can use the touch command (i.e. touch swat). It creates an empty file with the name specified. If you use touch on an existing file it sets the file's modification time to the current time. It just kind of...touches it :)


All times are GMT -5. The time now is 02:23 AM.