LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how do i create a document, then a directory and save the document in it. (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-create-a-document-then-a-directory-and-save-the-document-in-it-332839/)

jtdodge 06-12-2005 04:20 PM

how do i create a document, then a directory and save the document in it.
 
I'm just trying to get the hang of a few basics here. if someone could tell me how to create any old document and a directory to save it in...then give me a command to save it in that directory.

thanx all

jtdodge

Komakino 06-12-2005 04:26 PM

mkdir dirname

to make a directory.

Depends what sort of document you want to make for the other part. pico dirname/filename will create the file 'filename' in the new directory 'dirname'.

jtdodge 06-12-2005 04:31 PM

thanks Kom
 
thanks Kom.

big thanks!

jtdodge

kencaz 06-12-2005 04:37 PM

Here's an easy one from terminal:

md ~/test ; cat > ~/test/document.txt << end

This will create a directory under $HOME called "test" Then will prompt you for input text. You can keep typing then just enter the word "end" and it will save "document.txt" in /test directory.

Simple way to create a quick document without opening any applications.

KC

jtdodge 06-13-2005 08:40 AM

and to view the document.txt?
 
how, in command line, do i view the .txt afterward and possibly edit it and save it again?

thanks for your help, i very much appreciate it!

jtdodge

titopoquito 06-13-2005 08:48 AM

You could view it with "less filename.txt". But this is just for viewing, not for editing.
There are many different editors you can use. The most used will probably be "vim" or "vi" and "emacs". These are very powerful but a little bit big, too. I prefer the little editors pico or nano. Just try any of these editors by typing "editorname filename.txt".

jtdodge 06-13-2005 08:50 AM

thanks T
 
i appreciate your time T, thanks

lowpingnoob 06-13-2005 08:53 AM

woha... uh .... all those commands are above me, what I do is save the document in my home folder, then make new folder, then cut and paste. Seems to work, unless you aren't in graphical mode or you have a X Window system that doesn't have cut and paste (and there is one (ive seen it with my own eyes)).

mjjzf 06-13-2005 10:30 AM

If you want to move a file using the command line, the command is
Code:

mv /home/you/filename /newpath/
While I know this may seem a little cumbersome, it is very easy once you get the point of tab completion.
If you want to get a good feel for the commands, try reading at LinuxCommand.org.

jtdodge 06-15-2005 11:03 AM

from command line how does one download a program
 
i downloaded amanda onto my windows box in hopes to load it on my linux box. however i can't figure out how to load it. i'm thinking burn it to a cd and figure out how to load it from there.

i'm pretty lost on what would seem to be a pretty elementary thing.

any help would be great!

jdodge


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