SHARE:
Uncategorized

10 Useful to Somewhat Useful Bash Shortcuts: Every second saved is a second earned.com

Flatiron School / 23 October 2013

The following is a guest post by Brendan Manley and originally appeared on his blog. Brendan is currently in the Ruby-003 class at The Flatiron School. You can follow him on Twitter here.

10. move cursor one word to the left:

esc + b

Isn’t it annoying that you often find yourself holding down your left arrow key until it’s begging you to stop?

9. jump to the end of the line (figuratively…I mean with your cursor)

ctrl + e

8. jump to the beginning of the line

ctrl + a

7. delete the word immediately to the left

ctrl + w

6. delete entire line

ctrl + u

This one is now a personal favorite….

5. the equivalent of the browser back button, but in your terminal

cd –

Now, I know that everyone already knows about ‘cd ..’. However, tip number 5 is useful if you’re jumping around your directories with portkeys(Harry Potter reference).

4. create parent directory and children simultaneously 

mkdir -p mamabear/smokey/pokey/loki

3. chain commands using &&

rub && cd cool && ruby chronozoa.rb

why not?

2. use Chris Hemsworth’s striking good lucks to generate a list of when each file in the current directory was edited last (+ who did the deed)

ls – thor

1. generate random password

egrep -ioam1 ‘[a-z0-9]{8}’ /dev/urandom

Yes, you may never use this one. But now at least you know what you’re missing out on! ‘[a-z0-9]’ represents the characters that are allowed in the password you’ll be generating and {8} represents the character length.

; )

HTTPrime: What Can We Learn About Http Request-Response From a Steakhouse? Previous Post Ruby 'Exceptional' Knowledge- Next Post