I would add: TOOLS ... * 'tree' instead of 'ls -R' ...
Which package would that be in?
apt-file search /bin/tree61–70 of 166 posts
Earlier quoted context omitted.
I use C-r constantly. But sometimes I need to find a command, and then edit it before running it. What is the proper way to exit "search mode" and go into the normal "edit" mode?
C-g (as in quit https://www.gnu.org/software/emacs/manual/html_node/emacs/Qu... ) is the 'proper' way but yeah, not the only one.
Instead of ssh -R 12345:localhost:22 server.com "sleep 1000; exit" use ssh -R 12345:localhost:22 -n server.com The -n flag tells ssh to only make a connection, without ever running a shell. This means it even works when you don't have shell access (say, with a command= entry in .authorized_keys ). Also, I cannot recommend envoy enough in lieu of ssh-agent , if you're not using a GUI ssh agent already (e.g OSX keychai…
-N Do not execute a remote command. This is useful for just for‐
warding ports (protocol version 2 only).
-n Redirects stdin from /dev/null (actually, prevents reading from
stdin). This must be used when ssh is run in the background.
[1]: http://www.openbsd.org/cgi-bin/man.cgi?query=ssh&sektion=1In bash, "ESC" then "." fetches the last parameter of the previous command. It's invaluable (same as typing "!$" but you get to see and edit it)
Earlier quoted context omitted.
I use C-r constantly. But sometimes I need to find a command, and then edit it before running it. What is the proper way to exit "search mode" and go into the normal "edit" mode?
Any movement key will do the trick. I usually use cursor-right or the end key. It's so ingrained I had to actually do it in a shell to know what it was I did.
I can't replicate it now on my test box; it works exactly the way you say it should. It may be a terminal issue; I'm currently on Windows using cygwin to ssh to Linux.
man hier is pretty cool. It explains the root directory structure of the system.
TIL. As a long-time DOS user that often gets a bit lost on Unix systems I cannot stress how awesome it is to have found out about this!
Back in the late 90s when I first moved to Debian from Windows, growing up with a DOS CLI made the transition far easier to me (and having some FTP exposure didn't hurt either).
man hier is pretty cool. It explains the root directory structure of the system.
[1]: https://plus.google.com/+LennartPoetteringTheOneAndOnly/post...
I have for cmd in $(compgen -c); do if [[ $cmd =~ ^[0-9a-zA-Z]+$ ]]; then eval "alias $cmd?='man $cmd'"; fi; done in my .bashrc to alias command?=man command, saves some typing to get to man pages ( which I do very often )
# Put this script in a directory in your PATH.
# m: pipe man output through col and save to file(s).
mkdir -p ~/man # Only creates the dir first time, including all dirs in the path.
for name: # in $* is implied
man $name | col -bx > ~/man/$name.m
doneDo a "chmod u+x m" to be able to run it.
Then run it like this:
m ioctl stdio signal # or any other commands
Then:
pushd ~/man; view ioctl.m stdio.m signal.m; popd
to read those pages, now stripped of formatting characters.
Earlier quoted context omitted.
> You know what else I hate? Typing in long commands in the Mac OS X terminal and then them wrapping weirdly. Yeah, keeping ctrl pressed in and pressing x followed by e (CTRL + x e) will open up the current line in $EDITOR and when you edit and save, replaces the current line with what you entered in your editor. Really a killer feature.
In Linux with bash (and probably other shells that are bash-compatible), you can use vi to edit any of the commands in your command history, and then execute the edited version. Do this at the command prompt, or once in your ~/.bash_profile to make it permanent: set -o vi After that, you can search for any of the commands in your history, edit it, and then execute the edited command, by doing this: At the prompt, typ…
It's better than nothing though.
Missing trick: In bash, "ESC" then "." fetches the last parameter of the previous command. It's invaluable (same as typing "!$" but you get to see and edit it)
More details in this Stackoverflow answer: http://stackoverflow.com/a/4010170/578588