Make any command read line enabled (on *nix)

Make any command read line enabled (on *nix)

1
rlwrap sqlite3 database.db

Enable readline even if the command line application is not using it.

* View this command to comment, vote or add to favourites * View all commands by pykler

commandlinefu.com

by David Winterbottom (codeinthehole.com)

URL: http://feedproxy.google.com/~r/Command-line-fu/~3/mKEgYoyHCMA/make-any-command-read-line-enabled-on-nix

Enhanced by Zemanta

intercept stdout/stderr of another process or disowned process

The command is definately going to save your day if you have disowned the process by mistake. Only uses strace so might as well work on Solaris also, though not tried it.

intercept stdout/stderr of another process or disowned process

1
strace -e write=1,2 -p $PID 2>&1 | sed -un "/^ |/p" | sed -ue "s/^.{9 }(.{50}).+/1/g" -e 's/ //g' | xxd -r -p

Useful to recover a output(stdout and stderr) “disown”ed or “nohup“ep process of other instance of ssh.

With the others options the stdout / stderr is intercepted, but only the first n chars.

This way we can recover ALL text of stdout or stderr

* View this command to comment, vote or add to favourites * View all commands by glaudiston

commandlinefu.com

by David Winterbottom (codeinthehole.com)

URL: http://feedproxy.google.com/~r/Command-line-fu/~3/1SBr9I6EHUM/intercept-stdoutstderr-of-another-process-or-disowned-process

Enhanced by Zemanta

Broadcast your shell thru port 5000

Broadcast your shell thru port 5000

1
mkfifo /tmp/fifo;(nc -q0 -l 5000 < /tmp/fifo &);script -f /tmp/fifo

run

1
nc yourip 5000

elsewhere will produce an exact same mirror of your shell. This is handy when you want to show someone else some amazing stuff in your shell without giving them control over it.

* View this command to comment, vote or add to favourites * View all commands by clvv

commandlinefu.com

by David Winterbottom (codeinthehole.com)

URL: http://feedproxy.google.com/~r/Command-line-fu/~3/zSXMo0BnN8I/broadcast-your-shell-thru-port-5000

Enhanced by Zemanta