Live data from Hacker News

Awesome but commonly unknown Linux Commands

anchor.com.au

71–80 of 88 posts

Re: Awesome but commonly unknown Linux Commands

#74
post #6

Earlier quoted context omitted.

git "borrowed" this idea too. You can use `git checkout -` to checkout the last thing you checked out; very handy when merging.

Python sort of did too, you can use _ to access the last-returned variable in the interpreter. [testfunc(x) for x in testlist] success = _ print _ It's useful when using the interpreter as a calculator, or when you're bashing out some calculation you can never remember how to do properly.

The same thing also works in irb.

    >> "foo"
    => "foo"
    >> bar = _
    => "foo"
    >> bar
    => "foo"

Re: Awesome but commonly unknown Linux Commands

#75
post #25

Earlier quoted context omitted.

Yeah but only one directory in the history. With pushd/popd you can navigate as much as you want, an then popd to that directory you intended to bookmark.

yeah, I switched to cd - for a while but got bitten by this too many times. $ pwd /some/long/compli/cated/v1.0.7/path/to/_stuff $ cd /simple/ $ do -stuff $ cd ./foo $ do -stuff $ rem now let's get back to that complicated directory again $ cd - oh, wait, I cd'ed twice, shit

If you find yourself in this spot again, Ctrl-r `cd /som` helps.

Re: Awesome but commonly unknown Linux Commands

#77

Earlier quoted context omitted.

How is it different than xargs -P?

http://www.gnu.org/s/parallel/man.html#differences_between_x...

Thanks, I clicked the documentation link at the top of the page and gave up when it didn't go anywhere useful.

Re: Awesome but commonly unknown Linux Commands

#78

If you're running a modern Linux desktop, you should have a "notify-send" command which will cause a message to be displayed by your desktop-environment's pop-up notification system (on Ubuntu, this command is in the libnotify-bin package). I have two scripts I keep around which I call "notify-success" and "notify-failure": notify-success: notify-send --icon=gtk-dialog-info Success! "$*" notify-failure: notify-send -…

I just use a few aliased beep sequences so I can have an audio notification. I never have much need for more than a few at a time, so I've only written three such aliased beep tunes. Well, four really, I always have a special keyboard shortcut set to immediately run the one named "little_melody". By pressing down... well you get the idea.

Re: Awesome but commonly unknown Linux Commands

#80
Here are the tools I find indispensable as a sys admin:

- screen for accessing servers

- lshw for seeing Linux server hardware config

- cfengine for automating my system administration

- atop as an advanced top

http://www.atoptool.nl/downloadatop.php

atop uses color to show when a subsystem goes over warn/critical threshold. it can be run in present time, or can be used to go back in time and "play back the tape".

Post reply on HN