Results 1 to 4 of 4
Hey guys this may be a stupid question but ive searched on google and suprisingly i cnt find nething.
but back to the matter at hand. what command would i ...
- 05-26-2006 #1Just Joined!
- Join Date
- May 2006
- Posts
- 6
text file creation in the terminal
Hey guys this may be a stupid question but ive searched on google and suprisingly i cnt find nething.
but back to the matter at hand. what command would i use to make a simple text file in the terminal. but what im really trying to do is create a file on the desktop that will open a url to a website when u open it. i know u can go it using a GUI but im making a vowel that for the first month of using linux im going to do everything through the terminal lol.
anyone know what 2 do?
- 05-26-2006 #2
- 05-26-2006 #3Linux Guru
- Join Date
- Nov 2004
- Posts
- 6,110
To create an empty file you can use touch
To just put a string into a new file you could sayCode:touch nameoffile
Text editing can be done with vi/vim as mentioned above or with emacs. Both seem difficult to use, but believe me if you give it the little time at the start to find out how they work, you may find yourself using them more than gui text editors. They are quite powerful.Code:echo test you want in the file > destination.txt
- 05-26-2006 #4
To put the file on your desktop, navigate to /home/emblinex/Desktop before creating the file. Or if you've already made it somewhere else, just move it to the /home/emblinex/Desktop directory with the mv command.
The content for a file that opens a specific URL in a Web browser just needs to have the browser's launch command, followed by the URL. So to open LinuxForums in Firefox,
That first line is put at the top of all shell scripts, to identify them to the system as scripts (text files that are passed to the shell as commands).Code:#!/bin/sh /usr/bin/firefox http://www.linuxforums.org
You'll need to make it executable with the chmod command. After that, you can double-click it on your desktop or dot-slash it in a terminal to run it.Stand up and be counted as a Linux user!


Reply With Quote
