LinuxVillage

Questions En => Help requests => Discussion démarrée par: konaexpress le 25 mars 2013 à 04:16:03

Titre: The Basic Terminal
Posté par: konaexpress le 25 mars 2013 à 04:16:03
You old school Linux users will hate me for asking this but has anyone made or heard of a terminal app that uses basic word commands like copy, paste, move and back? I know that this would take longer to do things but it would be a great terminal for nebies. Just because the old ways is how it has always been done does not make it the correct way for everyone. 8)

............FLAME ON!............
Titre: Re : The Basic Terminal
Posté par: Taco.22 le 25 mars 2013 à 07:40:43
Many of the commands in terminal are in fact abbreviations of commonly used terms.  Examples are "ls" for "list", "cp" for "copy", "mv" for "move" and "cd" for "change directory".  With those basic commands you can navigate through the system, look at folder (directory) contents and move them around.  To save a lot of typing you also have autocomplete by hitting the "tab" key - just like a lot of word processors have.  Just think of it as the Readers Digest version of doing things - the shortened and abridged version! 
Titre: Re : The Basic Terminal
Posté par: melodie le 25 mars 2013 à 11:59:20
In your terminal, have a look at "man alias", and on the web, at this page:
http://www.linfo.org/make_alias_permanent.html (http://www.linfo.org/make_alias_permanent.html)

Titre: Re : Re : The Basic Terminal
Posté par: konaexpress le 25 mars 2013 à 16:02:40
Many of the commands in terminal are in fact abbreviations of commonly used terms.  Examples are "ls" for "list", "cp" for "copy", "mv" for "move" and "cd" for "change directory".  With those basic commands you can navigate through the system, look at folder (directory) contents and move them around.  To save a lot of typing you also have autocomplete by hitting the "tab" key - just like a lot of word processors have.  Just think of it as the Readers Digest version of doing things - the shortened and abridged version!

O' I agree with you, it was the same way in DOS back in my day. I just remember thinking, "why can't  I just put in words" to do this.

(Sigh) I am just getting old I think......
Titre: Re : Re : Re : The Basic Terminal
Posté par: melodie le 25 mars 2013 à 21:15:24
I just remember thinking, "why can't  I just put in words" to do this.

Hi,

As I mentioned above, by adding aliases in your ~/.bashrc, you can. You can even choose your own words.
(why when I write something I sometimes feel it as if I didn't talk at all?  :? )

Titre: Re : The Basic Terminal
Posté par: patrick013 le 26 mars 2013 à 00:24:03
Isn't the terminal for running short bash scripts, core utilities,
and initiating program commands where a little useful feedback
would be produced ?

Titre: Re : Re : Re : Re : The Basic Terminal
Posté par: konaexpress le 26 mars 2013 à 01:12:53
Hi,

As I mentioned above, by adding aliases in your ~/.bashrc, you can. You can even choose your own words.
(why when I write something I sometimes feel it as if I didn't talk at all?  :? )

Hi Melodie.

When did you get here? :P

I heard ya............
Titre: Re : Re : Re : Re : Re : The Basic Terminal
Posté par: melodie le 26 mars 2013 à 01:34:09
Hi Melodie.

When did you get here? :P

I heard ya............

:D

Titre: Re : Re : The Basic Terminal
Posté par: djohnston le 26 mars 2013 à 04:56:34
Isn't the terminal for running short bash scripts, core utilities, and initiating program commands where a little useful feedback would be produced ?

No. It's for starting emacs (https://kenno.wordpress.com/2007/10/22/start-emacs-in-terminal-mode/).  :D

Titre: Re : Re : Re : The Basic Terminal
Posté par: konaexpress le 26 mars 2013 à 05:05:07
No. It's for starting emacs (https://kenno.wordpress.com/2007/10/22/start-emacs-in-terminal-mode/).  :D

ugg!
Titre: Re : The Basic Terminal
Posté par: patrick013 le 26 mars 2013 à 05:12:47
I hate terminal editors, even mc is ugg !

Try this, save as dff in /usr/bin


df -T -BM

Save as dff, make executable.

Run in terminal.
Titre: Re : Re : The Basic Terminal
Posté par: djohnston le 26 mars 2013 à 06:56:49
Try this, save as dff in /usr/bin

df -T -BM

Save as dff, make executable.

Run in terminal.

You could set that as an alias. Add this as the last line in ~/.bashrc.

alias df="df -T -BM"
You can try it out first by entering the same line in a terminal emulator, then entering just df.
Titre: Re : The Basic Terminal
Posté par: konaexpress le 26 mars 2013 à 07:23:39
Citer
I hate terminal editors, even mc is ugg !

Midnight Commander is one of the FIRST things I uninstall after Libreoffice when I lode a new OS.
Titre: Re : Re : The Basic Terminal
Posté par: melodie le 26 mars 2013 à 16:17:03
Midnight Commander is one of the FIRST things I uninstall after Libreoffice when I lode a new OS.

Just the reverse side here : first things I install. Don't ask me why. ^_^

Titre: Re : The Basic Terminal
Posté par: djohnston le 26 mars 2013 à 20:02:44
Midnight Commander is a very useful tool. I use it before remastering.
Titre: Re : Re : Re : The Basic Terminal
Posté par: patrick013 le 26 mars 2013 à 22:14:27
You could set that as an alias. Add this as the last line in ~/.bashrc.

alias df="df -T -BM"
You can try it out first by entering the same line in a terminal emulator, then entering just df.

I see.   Thanks.

edit: or in /etc/bashrc looks good for all users.
Titre: Re : Re : The Basic Terminal
Posté par: patrick013 le 26 mars 2013 à 22:19:12
Midnight Commander is a very useful tool. I use it before remastering.

Sure, the text editor is just a little basic.
Titre: Re : The Basic Terminal
Posté par: konaexpress le 27 mars 2013 à 02:44:21
Yea, how I love to use pico and MC. I don't need no stupid mouse, I can tab my way to the bottom after 25 stopes......... :o ;D
Titre: Re : The Basic Terminal
Posté par: djohnston le 27 mars 2013 à 04:01:32
I don't know if you guys are referring to MC's text editor or the system's default text editor. If you accept MC's default settings, you get the system's default text editor. If you want to use MC's simple text editor, you have to change MC's default settings. With a Midnight Commander window open, click on Options > Configuration. In the right panel (Other options), check Use internal edit. Save the settings.

I don't like using vi or emacs. I tend to get lost in both. Nano is the CLI editor I use, when available. MC's internal editor is just as easy to use, in my opinion.
Titre: Re : Re : The Basic Terminal
Posté par: melodie le 27 mars 2013 à 10:49:15
I don't need no stupid mouse, I can tab my way to the bottom after 25 stopes......... :o ;D

To add to what djohnston just said, you don't need to have stops : you can use the "page down / page up" keys of your keyboard, and the "beginning of line / end of line" keys on the same keyboard of your's. Perhaps have you not used them so far ? (I have seen many people using a computer since some time who didn't notice these one keyboard keys so I think maybe you haven't either?)

I don't use vi or emacs either, but mcedit or vim (the enhanced version of vi which is much easier, with elflord color configured in the /etc/vimrc file... because it is nicer and easier to read)

Titre: Re : Re : The Basic Terminal
Posté par: Taco.22 le 27 mars 2013 à 13:30:52
I don't know if you guys are referring to MC's text editor or the system's default text editor. If you accept MC's default settings, you get the system's default text editor. If you want to use MC's simple text editor, you have to change MC's default settings. With a Midnight Commander window open, click on Options > Configuration. In the right panel (Other options), check Use internal edit. Save the settings.

I tried that and if anything the MC editor is easier to use than nano!  It all revolves around the "F" keys.  I'm still toying with the whole MC thing; have been for a couple of years - slowly getting my brain around it all!
Titre: Re : The Basic Terminal
Posté par: konaexpress le 27 mars 2013 à 16:03:54
I understand that some people can fly around using only the key board but I am just not wired that way.

Case in point:  The BBS software that I am working on in Python, I hate trying to remember what key goes to what menu item. In this menu, the user types what is on the menu. Mail is "mail" and files is "files" on the key board. K.I.S.S is the way to go,  don't have a help file that is so stupid long that it flys by on the screen and other things like that.
Titre: Re : The Basic Terminal
Posté par: patrick013 le 27 mars 2013 à 23:25:38
The default mc editor doesn't create text files, just edits
existing ones.

Need a blank text file to use to do that, otherwise it's OK.

Mine keeps using the built-in editor.
Titre: Re : Re : The Basic Terminal
Posté par: Taco.22 le 27 mars 2013 à 23:38:54
The default mc editor doesn't create text files, just edits
existing ones.

Need a blank text file to use to do that, otherwise it's OK.

Mine keeps using the built-in editor.

Thanks for that - I'd been wondering about how to create a file!


EDIT - of course the command "touch" allows the creation of a file, a bit like the "mkdir" command.
Titre: Re : The Basic Terminal
Posté par: melodie le 28 mars 2013 à 02:03:16
I do disagree on this.

See here after:

$ cd /tmp/$ mcedit test.txt
/adding some text, then hit F2 to save, then F10 to quit, then:

$ cat test.txt
Hello World!

> Hello!

I can do it, so should you ?

Maybe were you talking about the editor when you are inside mc ?

I just tried I can do it too. Open mc (in /tmp for instance), get the selection on top, on "..", hit F2 then go up to '@' "Do something on the current file", once there you can type a command line, type "mcedit text2.txt", don't mind about the warning and edit your file. Once done, hit F2 to save, then F10 to quit: you have a new file.



Titre: Re : The Basic Terminal
Posté par: patrick013 le 28 mars 2013 à 05:34:44
Well now I've got mcedit and alias' working.
Even setup sudo for the terminal.
Titre: Re : Re : The Basic Terminal
Posté par: djohnston le 28 mars 2013 à 07:07:08
Well now I've got mcedit and alias' working.
Even setup sudo for the terminal.

Now you're cooking!
Titre: Re : The Basic Terminal
Posté par: Taco.22 le 28 mars 2013 à 09:44:43
Yep, "mcedit name_of_file" creates a file, and F10 saves it.  Cool.  But I have a query - how do I get to the top menus of left, file, command etc by keyboard?  I've tried a number of things but I'm stumped.
Titre: Re : The Basic Terminal
Posté par: mimas le 28 mars 2013 à 12:11:52
Simple, you can't. Mcedit is not mc, this is another program. It has only a one menu, the bar at the bottom.
Titre: Re : The Basic Terminal
Posté par: melodie le 28 mars 2013 à 12:46:50
Hi,

Taco, if you mean "in mc" and not "in mcedit" as mimas supposed, then you need to press F9, then you reach the menus. Then, you can use the Enter key to display the submenus, and then the arrows for navigation between main menus (right and left keys) and also arrows to reach the submenus (up and down arrows).

PS: mimas I am sorry to tell you that you are wrong, however checking has brought me to discover it: F9 also allows accessing to top menus in mcedit, which are not the same in mcedit as in mc, but related to text editing. I'll go back there explore more. Wao !

PS2: in mcedit it is possible to send an email to someone. It needs sendmail to be installed and configured...

PS3: and there is also a large choice for encoding, syntax highlighting for many kinds of coding... and lots more than I will ever be able to learn!





Titre: Re : The Basic Terminal
Posté par: mimas le 28 mars 2013 à 13:26:03
Well... I missed the F9 key. :)
Titre: Re : The Basic Terminal
Posté par: Taco.22 le 28 mars 2013 à 14:17:19
Aargh - bloody F9!!!  I should have twigged - it's the "9PullDn" button at the bottom.  Probably the only button I didn't hit!
Titre: Re : Re : The Basic Terminal
Posté par: melodie le 28 mars 2013 à 14:28:48
Aargh - bloody F9!!!

Don't type so hard!! ;D

Titre: Re : The Basic Terminal
Posté par: Taco.22 le 28 mars 2013 à 14:53:51
Sorry - at least I didn't use capitals !!

By the way , the command "touch" to create a file; to create ... brought to mind this -

(http://media.smithsonianmag.com/images/The-Creation-of-Adam-Michelangelo-631.jpg)

I kind of like the image, but don't get me wrong - no religion.  Just liked the magical concept of creating.  Whimsical.
Titre: Re : The Basic Terminal
Posté par: konaexpress le 28 mars 2013 à 15:54:21
Yea, programs that rely so much on F-keys just don't fit in to my world. All new computers use the F-keys to control sound or the screen or other things.
Titre: Re : Re : The Basic Terminal
Posté par: djohnston le 28 mars 2013 à 20:38:47
Yea, programs that rely so much on F-keys just don't fit in to my world. All new computers use the F-keys to control sound or the screen or other things.
The functions aren't determined by the computer. They are mapped to different functions by the operating system and by application programs. Here's (http://www.computerhope.com/issues/ch000306.htm) a short explanation on the use of function keys in Windows and Mac OSX.
Titre: Re : Re : The Basic Terminal
Posté par: patrick013 le 28 mars 2013 à 22:29:18

By the way , the command "touch" to create a file; to create ... brought to mind this -


Well if I make an alias for touch called create I can  "create text.txt"
anytime, anyplace.    Shouldn't forget that.
Titre: Re : Re : Re : The Basic Terminal
Posté par: konaexpress le 29 mars 2013 à 00:45:15
The functions aren't determined by the computer. They are mapped to different functions by the operating system and by application programs. Here's (http://www.computerhope.com/issues/ch000306.htm) a short explanation on the use of function keys in Windows and Mac OSX.

I understand what the keys do on a Mac, got one. The problem is when a distro is installed in VBox, the host OS will still keep control of the Fkeys so I am stuck using a mouse anyway.

The only computer I have that is Linux native is my netbook and I have to go into the BIOS to turn the Fkeys off factory settings so that I can use them in Linux, trust me on this one.
Titre: Re : Re : Re : Re : The Basic Terminal
Posté par: djohnston le 29 mars 2013 à 08:58:06
The only computer I have that is Linux native is my netbook and I have to go into the BIOS to turn the Fkeys off factory settings so that I can use them in Linux, trust me on this one.

Okay, I will.  ;D
Titre: Re : The Basic Terminal
Posté par: pdurbin le 29 mars 2013 à 11:07:54
For "back" in the terminal try this:

cd -

When you want more power, try pushd and popd.