Page 2 of 2

Re: How do you remember bits of sudo code?

Posted: Fri Feb 14, 2020 3:12 pm
by Waka
A lot of is what I would describe as "muscle memory". There are some commands that I can never get right without looking them up, or at least failing them once and get them right the second time. For example I can never remember if it's "xstart" or "startx". Other commands I even use in the windows cmd, even though they don't exist there and then I wonder why the command doesn't work. It even went so far that I specifically created a ll.cmd that executes a dir, because EVERY. SINGLE. TIME I open up a cmd the first thing I type is "ll" only to be greeted with a "unknown command" message... :lol:

The only commands I have never mistakenly used on the platforms are ipconfig (windows) and ifconfig (linux). Don't know why that is... propably "muscle memory". ;)

Re: How do you remember bits of sudo code?

Posted: Fri Feb 14, 2020 6:46 pm
by Portreve
AZgl1500 wrote:
Mon Feb 10, 2020 9:15 pm
[screenshot of notebook]
I like your documentation writing style, for what little I can see of it.

Re: How do you remember bits of sudo code?

Posted: Sat Feb 15, 2020 7:41 am
by AZgl1500
Hoser Rob wrote:
Fri Feb 14, 2020 8:56 am
AZgl1500 wrote:
Thu Feb 13, 2020 10:14 am
.... for the life of me, I just cannot figure out how CherryTree works.....
I've found that going into preferences > toolbar and removing everything from it that I don't need (which is most of it) helps a lot. Programs that do a lot more than I need are fine if I can clean up the menu, and better than underpowered ones.
I have made several attempts at CherryTree, and for me, it just simply is a piece of gobbledegook, that is NOT worth my time.
I have found that Evernote is completely safe, does not allow any of my data to escape to the outside world, and is immediately accessible to me no matter where I am. Via my cellphone, or any PC that is available that I can log into Evernote.

CherryTree does not have that access, nor does the way it store notes meet with my satisfaction.
Too damn convoluted. So, I have uninstalled it. If it won't work with my Smartphone, it is useless.

Re: How do you remember bits of sudo code?

Posted: Sat Feb 15, 2020 10:20 am
by ajgreeny
Like a lot other posters I also have a cheat sheet of useful commands, but more useful than that is to use many aliases where typing a single word or phrase can be a shortcut for a long complicated command.

As I said in a recent post my .bash_aliases file contains 40 or 50 aliases which saves me a lot of time and typing.

Re: How do you remember bits of sudo code?

Posted: Sat Feb 15, 2020 9:15 pm
by all41
I replied to a post in a different category but pertinent in this thread as well:
viewtopic.php?p=1763139#p1763139

Re: How do you remember bits of sudo code?

Posted: Sun Feb 23, 2020 2:16 pm
by BG405
smurphos wrote:
Mon Feb 10, 2020 1:41 am
Another trick which will allow you to type the start of a partially remembered command in the terminal and then use the up/down arrows to find the last time you used it is to create a file called ~/.inputrc and add the content

Code: Select all

$include /etc/inputrc

# command history search
"\e[A": history-search-backward
"\e[B": history-search-forward

# extended command completion with tab
set show-all-if-ambiguous on
set completion-ignore-case on
You will need to log of and back on for that to take effect.
Very handy, thanks! I had been looking for this info as had seen something like it before but couldn't remember where. Note: logout wasn't necessary in my case; simply opening a new Terminal provided use of this feature.
all41 wrote:
Mon Feb 10, 2020 12:08 pm
my ~/.input.rc also contains some further entries:

Code: Select all

$include /etc/inputrc

# command history search
"\e[A": history-search-backward
"\e[B": history-search-forward
"\e[C": forward-char
"\e[D": backward-char

# extended auto-completion with tab
set show-all-if-ambiguous on
set completion-ignore-case on


# colors
set colored-completion-prefix on
set colored-stats on

# misc
set blink-matching-paren on
set mark-symlinked-directories = on
I do not know the functions of the extra lines--do you?
Without trying, I don't. But it's easy to test with a couple of Terminals side-by-side, one opened after the first version of the file is written and the second after changing it to match yours here. One of the beauties of Linux! I'll probably have a go at this later. Those descriptions look pretty self-explanatory to me; I assume "set blink-matching-paren" means "parenthesis" (brackets), but we'll see. :)
Waka wrote:
Fri Feb 14, 2020 3:12 pm
Other commands I even use in the windows cmd, even though they don't exist there
I've come a cropper in that way too, so to speak. Typing Arch-specific commands in an Ubuntu-based environment (Mint) or occasionally the other way round. Sure I've done it in Windows CMD in the past too. :oops:
ajgreeny wrote:
Sat Feb 15, 2020 10:20 am
use many aliases where typing a single word or phrase can be a shortcut for a long complicated command
This saves a lot of typing as well, but useful if you get the alias to display the full command to help you to remember how things work, as I described in the thread I want to be a linux guru in months linked above by all41.

Re: How do you remember bits of sudo code?

Posted: Sun Feb 23, 2020 10:52 pm
by rickNS
smurphos wrote:
Mon Feb 10, 2020 1:41 am

Another trick which will allow you to type the start of a partially remembered command in the terminal and then use the up/down arrows to find the last time you used it is to create a file called ~/.inputrc and add the content....snip
That is a slick bit of code for sure @smurphos.

Having a look at my own .bash_history (some 1600+ lines in about a year) I see a lot of duplication, (probably more than 50%) things like ; ls, cd, inxi -Fxz, clear, etc. appear over, and over.
So was thinking that if the duplication was removed one (or myself as one example) might not need to increase the HISTSIZE so much ?

I went ahead and added the "erasedups" to HISTCONTROL, but it seems to have no effect / doesn't work ?
I started a thread about it not working, that got put in the bash section, maybe you might have a look at it ?

Re: How do you remember bits of sudo code?

Posted: Sun Feb 23, 2020 11:08 pm
by all41
Why care about duplicates though--they don't interfere at all, especially using the custom .inputrc
I have 9545 entries and that only uses 251 kB storage--minuscule

Re: How do you remember bits of sudo code?

Posted: Sun Feb 23, 2020 11:14 pm
by rickNS
True, I can't argue about the size of the space used...less than one small picture.

I guess it just bugs me that erasedups don't work as it should. And they are not hard to remove manually either.

Re: How do you remember bits of sudo code?

Posted: Wed Feb 26, 2020 2:17 pm
by NuBz
For one thing sudo code is another subject and not terminal commands

Re: How do you remember bits of sudo code?

Posted: Fri Feb 28, 2020 7:50 pm
by mediclaser
RIH wrote:
Sun Feb 09, 2020 10:44 pm
...So what I have done is create a little text file on my desktop called 'Useful terminal Commands'.
It contains commands that others with knowledge have posted in the Forum in response to past queries & my own brief explanation of what the command does....
Whoa! That is exactly how I named my document where I list all terminal commands I had to use which are not easy to remember. :shock: