<div dir="ltr">2008/10/9 NoOp <span dir="ltr"><<a href="mailto:glgxg@sbcglobal.net">glgxg@sbcglobal.net</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div class="Wj3C7c">On 10/05/2008 08:49 AM, David Clark wrote:<br>
> I am now comfortable enough with Ubuntu that I want to venture out of the<br>
> GUI. I come from a command line background-back to DOS 4 (yuck)<br>
><br>
> So where do I begin?</div></div></blockquote><div></div><div>You got good answers already, here is more:</div><div> </div><div>In the terminal, a few commands would probably make it easier to find other commands…</div>
<div></div><div>The help command is called "<font face="courier new,monospace">man</font>" in Unix (and Linux of course).</div><div><font face="courier new,monospace">man intro</font></div><div>could be a strart.</div><div>
</div><div>Most commands have options, which begins with one or two "-" (minus). You don't need one minus for each option. The following are possible:</div><div><font face="courier new,monospace">ls -laB</font></div><div>
(rather than <font face="courier new,monospace">ls -l -a -B</font>)</div><div>"ls" is the command for listing directories, by the way. "DIR" in DOS.</div><div></div><div>Some options are words, then you need two minuses:</div>
<div><font face="courier new,monospace">cp --recursive /my/stuff /my/backup/place/</font></div><div><font face="arial,helvetica,sans-serif">"cp" means "copy".</font></div><div><font face="courier new,monospace"></font></div>
<div><font face="arial,helvetica,sans-serif">Some options can be written in more than one way. The above is the same as</font></div><div><font face="courier new,monospace">cp -r /my/stuff /my/backup/place/</font><font face="courier new,monospace"></font></div>
<div><font face="arial,helvetica,sans-serif">and</font></div><div><font face="courier new,monospace">cp -R /my/stuff /my/backup/place/</font><font face="courier new,monospace"></font></div><div><font face="courier new,monospace"></font></div>
<div><font face="courier new,monospace">man -k copy</font></div><div><font face="arial,helvetica,sans-serif">The "k" stands for "keyword", so the command above gives you a list with short descriptions of commands in which descriptions the word "copy" is mentioned.</font></div>
<div><font face="arial,helvetica,sans-serif"></font></div><div><font face="arial,helvetica,sans-serif">Capital letters are different from small letters.</font></div><div><font face="courier new,monospace">CP -r /my/stuff /my/backup/place/</font><font face="arial,helvetica,sans-serif"></font></div>
<div><font face="arial,helvetica,sans-serif">won't work.</font></div><div><font face="arial,helvetica,sans-serif"></font></div><div><font face="arial,helvetica,sans-serif">Some characters are good to know about, like the pipe character which lets you send the output of one command as the input of another command:</font></div>
<div><font face="arial,helvetica,sans-serif"></font></div><div><font face="arial,helvetica,sans-serif">ls -laB /my/directory/with/hundred/of/files | more</font></div><div><font face="arial,helvetica,sans-serif">Note that we use / and not \ in Unix, but I guess that have been obvious for you, since you can see this in the GUI too. Anyway, first we list a lot of files, but the output is sent to the command "more" instead of the standard output. "more" makes sure that the output stops so you can see the information page by page (hit space for next page). There is also a similar command called "less" which many people prefer. It's more advanced than "more" I think, I don't know.</font></div>
<div><font face="arial,helvetica,sans-serif"></font></div><div><font face="arial,helvetica,sans-serif">To redirect you can use the ">" character:</font></div><div><font face="arial,helvetica,sans-serif"></font></div><div>
<font face="courier new,monospace">cp -r /my/stuff /my/backup/place/ > /my/path/my_listing</font><font face="arial,helvetica,sans-serif"></font></div><div><font face="courier new,monospace"></font></div><div><font face="arial,helvetica,sans-serif">">>" adds to an existing file.</font></div>
<div><font face="arial,helvetica,sans-serif"></font></div><div><font face="arial,helvetica,sans-serif">In many cases you don't need a file suffix. If you create a text file and call it "MyFile", it will still be opened with your preferred text editor when clicking it. I even tried to rename a jpg to png, Worked perfectly.</font></div>
<div><font face="arial,helvetica,sans-serif"></font></div><div><font face="arial,helvetica,sans-serif">You can use the "<" if you want to give a command instructions from a file rather than from the keyboard. Something like this:</font></div>
<div><font face="courier new,monospace">grep search-word < /my/path/MyFile2</font></div><div><font face="courier new,monospace">grep search-word < /my/path/MyFile2 > /my/path/MyFile3</font><font face="courier new,monospace"></font></div>
<div><font face="arial,helvetica,sans-serif"></font></div><div><font face="arial,helvetica,sans-serif">Well, there's a lot more of course. Google is a good help for finding more, as usual.</font></div><div><font face="arial,helvetica,sans-serif"></font></div>
<div><font face="arial,helvetica,sans-serif"></font></div><div><font face="arial,helvetica,sans-serif">J.R.</font></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div class="Wj3C7c"><br>
<br>
</div></div><a href="https://help.ubuntu.com/8.04/advanced-topics/C/index.html" target="_blank">https://help.ubuntu.com/8.04/advanced-topics/C/index.html</a><br>
  <a href="https://help.ubuntu.com/8.04/basic-commands/C/" target="_blank">https://help.ubuntu.com/8.04/basic-commands/C/</a><br>
<div><div class="Wj3C7c"><br>
<br>
--<br>
ubuntu-users mailing list<br>
<a href="mailto:ubuntu-users@lists.ubuntu.com">ubuntu-users@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-users" target="_blank">https://lists.ubuntu.com/mailman/listinfo/ubuntu-users</a><br>
</div></div></blockquote><br></div>