hope

  • Random
  • Archive
  • RSS
  • Ask me anything

  • In bash, use Ctrl-R to search through command history.
  • In bash, use Ctrl-W to kill the last word, and Ctrl-U to kill the line. See man readline for default keybindings in bash. There are a lot. For example Alt-. cycles through prevous arguments, and Alt-* expands a glob.
  • To go back to the previous working directory: cd -
  • Use xargs (or parallel). It’s very powerful. Note you can control how many items execute per line (-L) as well as parallelism (-P). If you’re not sure if it’ll do the right thing, use xargs echo first. Also, -I{} is handy. Examples:
find . -name \*.py | xargs grep some_function
cat hosts | xargs -I{} ssh root@{} hostname
  • pstree -p is a helpful display of the process tree.
  • Use pgrep and pkill to find or signal processes by name (-f is helpful).
  • Know the various signals you can send processes. For example, to suspend a process, use kill -STOP [pid].  For the full list, see man 7 signal

Source: quora.com

  • 2 months ago
  • Permalink
  • Share
    Tweet
← Previous • Next →

hope

“What seems to us as bitter trials are often blessings in disguise”

Following

I Dig These Posts

  • Post via badassjs
    2011: A Badass JavaScript Year In Review

    2011 has been a great year for JavaScript. Web browsers have given us great new tools to use and we have...

    Post via badassjs
  • Photo via daslee

    buzzfeed:

    Doing math.

    (Via Reddit)

    Photo via daslee
  • Photo via bustr

    Oh yeah!

    Photo via bustr
  • Video via newdefault
    Video

    Royksopp - Remind Me (via emimusic)

    Video via newdefault
See more →
  • RSS
  • Random
  • Archive
  • Ask me anything
  • Mobile

Effector Theme by Carlo Franco.

Powered by Tumblr