See the Security and Bug Fixes Section - Grub EFI Install Updates Fix Sticky


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Terminal customisations (prompt, avoiding ./ and aliasing cd ..)
#3
Just going to add these as and when I find them.

A simple alias to get rm to behave like DOS del.

Code:
alias del="rm -r"

The -r is the option added to recursively delete directory contents (as well as the directory specified). Be careful you don't accidentally delete a directory. By default rm doesn't delete directories so the -r option is added so you can use del as a delete all command.

Code:
#compile and execute a program easily
function run { gcc -o $1 $1.c; $1; }

If you're learning to program in C (like I am, for fun) then this makes things a bit quicker. It overwrites by default.

Instead of typing:
Code:
gcc -o HelloWorld Helloworld.c
./Helloworld

all you have to type is:
Code:
run HelloWorld

needs the line, PATH=.:$PATH, to be added beforehand to take advantage of avoiding ./

And a few other additions:

Code:
alias cls="clear"
alias type="cat"

I did try using less with a -FX option but it doesn't behave like I want it to. Scrolls one line at a time and only exits on ^Z. cat is fine for the job because Terminal has a vertical scroll bar. If it's bigger than 1 screen just scroll up using the mouse. No problemo!
Reply


Messages In This Thread
Re: Terminal customisations (prompt, avoiding ./ and aliasing cd ..) - by alowe - 03-30-2018, 12:15 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)