Skip to content

Instantly share code, notes, and snippets.

@caprest
Last active October 25, 2017 00:36
Show Gist options
  • Save caprest/8886718738de444d570c98fa1e488aa3 to your computer and use it in GitHub Desktop.
Save caprest/8886718738de444d570c98fa1e488aa3 to your computer and use it in GitHub Desktop.
コマンドメモ

shell

  • ファイルの中から文字列検索 find ./ -type f -print | xargs grep 'hoge'

tmux

  • tmuxでprefixの確認 tmux show-options -g prefix
  • tmuxでセッションに名前をつけて起動 tmux new -s my_session
  • セッション名を指定してアタッチ tmux a -t my_session
  • セッション一覧
    tmux ls

sshポートフォワーディングとjupyter

リモートで
jupyter notebook --no-browser --port={}
ローカルで
ssh -N -f -L 8888:localhost:{} hostname -Lはポートフォワーディング用のオプション
-f はリモート側でバックグラウンドに潜るオプション
-N はリモートで何もしないオプション
X11したいのならば最後に-Yを付けるべきかも
殺したいときは
ps aux | grep ssh
で調べて殺す。
参考
https://www.kmc.gr.jp/advent-calendar/ssh/2013/12/09/tunnel2.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment