Live data from Hacker News

What's the one Linux command you wish you knew years ago?

reddit.com

171–180 of 216 posts

Re: What's the one Linux command you wish you knew years ago?

#171
post #143

Earlier quoted context omitted.

Perhaps not, but tmux's bindings are nearly all backwards-compatible with screen's. Well, the default escape char is ctrl-B but I (and I think most folks) just remap it to ctrl-A immediately.

How do people use CTRL-A for screen without being driven batty that the emacs-style 'start-of-line' command is not available? I use that constantly!

[deleted]

Re: What's the one Linux command you wish you knew years ago?

#173

I'm not sure why, but it was a while before I ran across du -h. Not sure how I ever did without it! Oh, and "sudo !!". Definitely key, along with "& disown".

I also use !$ all the time. It is replaced with the last argument to the previous command line

Re: What's the one Linux command you wish you knew years ago?

#174

Earlier quoted context omitted.

How do people use CTRL-A for screen without being driven batty that the emacs-style 'start-of-line' command is not available? I use that constantly!

People rebind it. I bind it to ^o. # put this in your .screenrc escape ^Oo

or if you never use toggle-input-method, maybe C-\

  escape ^\\

Re: What's the one Linux command you wish you knew years ago?

#175
post #82
post #76

Earlier quoted context omitted.

I'm baffled all the time by the lack of clear examples on many manpages.

Yep, a short list of useful one-liners would go a long way. Often, your use-case will be a straight specialisation of one of the examples, and if not, chances are you can cobble together something from several examples. I'd like to have a auxiliary help command for this, e.g. example ffmpeg in addition to man ffmpeg (another 18k words manpage). Edit: This works rather well: function cmdfu() { curl "http://www.command…

Another alternative is Cheat" rel="nofollow">http://cheat.errtheblog.com/>Cheat, which is essentially a CLI accessible wiki of usage examples. It was originally focused on Ruby (and still is to an extent), but it gives decent results a lot of the time.

Re: What's the one Linux command you wish you knew years ago?

#176
post #143

Earlier quoted context omitted.

Perhaps not, but tmux's bindings are nearly all backwards-compatible with screen's. Well, the default escape char is ctrl-B but I (and I think most folks) just remap it to ctrl-A immediately.

How do people use CTRL-A for screen without being driven batty that the emacs-style 'start-of-line' command is not available? I use that constantly!

I don't use CONTROL-A to go to the start of the line, instead I hit ESCAPE 0

It works because I have my shell configured to use vi mode for command line editing.

Re: What's the one Linux command you wish you knew years ago?

#177
post #143

Earlier quoted context omitted.

Perhaps not, but tmux's bindings are nearly all backwards-compatible with screen's. Well, the default escape char is ctrl-B but I (and I think most folks) just remap it to ctrl-A immediately.

How do people use CTRL-A for screen without being driven batty that the emacs-style 'start-of-line' command is not available? I use that constantly!

i use the ratpoison window manager (it works a lot like tmux/screen, but for x11) and have control+a set as its prefix key. i use tmux for some long-lasting remote sessions, so to send a control+a to the shell running under tmux, under ratpoison, i type control+a, a, control+a, a. yes, i do it a lot. no, i'm not going to change it.

Re: What's the one Linux command you wish you knew years ago?

#179
post #135
post #130

Earlier quoted context omitted.

Screen is the only real answer, I've ever found.

There's also 'tmux': http://tmux.sourceforge.net/

True, screen and screenlikes. I've never used tmux, mostly because screen just works well enough for me.

Re: What's the one Linux command you wish you knew years ago?

#180

Earlier quoted context omitted.

How do people use CTRL-A for screen without being driven batty that the emacs-style 'start-of-line' command is not available? I use that constantly!

People rebind it. I bind it to ^o. # put this in your .screenrc escape ^Oo

I always rebind it to ^z. Since I never need to put a process in the background (I just open a new screen instead) when running screen, it never bothers me that that combo is a bit harder to type.
Post reply on HN