最近、ドコモの128k通信で自宅や大学の計算機にネットブックでsshかけて作業してます。
回線速度はCUIならなんとか気にならない程度でしょうか。vncでGUIもってくると流石に操作に支障が出てきますね。
でもやっぱり、でっかいプログラムのコンパイルとか実行をするときは、結果だけが返ってくるだけあって、力点のPCのスペックや回線速度は気になりません。
なんと幸せ・・・。
そんな感じです。
今回はホントにメモ中心です。すみません。
■tarアーカイブのコマンドについてメモ
・tarアーカイブの作成
- $ tar cvf hoge.tar dir
・tarアーカイブの中身を表示
- $ tar tf hoge.tar
・tarアーカイブの復元
- $ tar xvf hoge.tar
・tarアーカイブにfoo.txtを追加
- $ tar rvf hoge.tar foo.txt
■zshの設定についてメモ
zshを使っていらっしゃる方というか浸かっていらっしゃる方は見かけませんが、aliasの設定などはこんな感じにしてます。よかったら参考にしてください。
zshだと&と引数を両立させるためには関数として記述しなければならないのが少し厄介ですが、このままコピーすれば無問題ですね。
aliasを設定しておくと普段はとても便利になりますが、sshで接続してウインドウが開けないときに、困りますよね?
そんなときはバックスラッシュをコマンドの前に付ければ、エイリアスを一時的に解除することができます。
頻繁にsshする方は、そのセッションだけバックグラウンド実行させるためのエイリアスの設定を解除するスクリプトを用意しておくと楽だと思います。
---------------------------------------------------------------
#! /bin/zsh
#
# ~/.zshrc
# z-shell start-up script for students
#
# set keybind
bindkey -e
# set alias
# typo
alias cd..='cd ..'
alias sl='ls --color=auto'
alias kls='ls --color=auto'
alias qls='ls --color=auto'
alias s='ls --color=auto'
alias les='less --color=auto'
alias l='ls --color=auto'
alias lf='ls -F --color=auto'
# info
alias ls='ls -F --color=auto'
alias ll='ls -l --color=auto'
alias la='ls -a --color=auto'
#
alias vim='vi'
alias reload='source ~/.zshrc'
# add option
#alias emacs='emacs -rv '
# ask
alias mv='mv -i'
alias cp='cp -i'
alias rm='rm -i'
## global alias
alias -g H='| head'
alias -g T='| tail'
alias -g G='| grep'
# short name
alias h='head'
alias t='tail'
alias g='grep'
alias j='jobs'
#function cd() { builtin cd $@ && ls; }
function emacs() {command emacs -rv $* &}
function firefox() {command firefox $* &}
function mozilla() {command firefox $* &}
function gv() { command gv $* & }
function xdvi() { command xdvi $* & }
function evince() { command evince $* & }
# load module math
zmodload -i zsh/mathfunc
---------------------------------------------------------------# z-shell start-up script for students
#
# set keybind
bindkey -e
# set alias
# typo
alias cd..='cd ..'
alias sl='ls --color=auto'
alias kls='ls --color=auto'
alias qls='ls --color=auto'
alias s='ls --color=auto'
alias les='less --color=auto'
alias l='ls --color=auto'
alias lf='ls -F --color=auto'
# info
alias ls='ls -F --color=auto'
alias ll='ls -l --color=auto'
alias la='ls -a --color=auto'
#
alias vim='vi'
alias reload='source ~/.zshrc'
# add option
#alias emacs='emacs -rv '
# ask
alias mv='mv -i'
alias cp='cp -i'
alias rm='rm -i'
## global alias
alias -g H='| head'
alias -g T='| tail'
alias -g G='| grep'
# short name
alias h='head'
alias t='tail'
alias g='grep'
alias j='jobs'
#function cd() { builtin cd $@ && ls; }
function emacs() {command emacs -rv $* &}
function firefox() {command firefox $* &}
function mozilla() {command firefox $* &}
function gv() { command gv $* & }
function xdvi() { command xdvi $* & }
function evince() { command evince $* & }
# load module math
zmodload -i zsh/mathfunc
■texについて
プリアンブル に以下を記述することで、余白(左15mm、上5mm、幅)を設定します。
---------------------------------------------------------------
%--余白の設定
\setlength{\topmargin}{5mm}
\addtolength{\topmargin}{-1in}
\setlength{\oddsidemargin}{15mm}
\addtolength{\oddsidemargin}{-1in}
\setlength{\evensidemargin}{15mm}
\addtolength{\evensidemargin}{-1in}
\setlength{\textwidth}{170mm}
\setlength{\textheight}{254mm}
\setlength{\headsep}{0mm}
\setlength{\headheight}{0mm}
\setlength{\topskip}{0mm}
---------------------------------------------------------------\setlength{\topmargin}{5mm}
\addtolength{\topmargin}{-1in}
\setlength{\oddsidemargin}{15mm}
\addtolength{\oddsidemargin}{-1in}
\setlength{\evensidemargin}{15mm}
\addtolength{\evensidemargin}{-1in}
\setlength{\textwidth}{170mm}
\setlength{\textheight}{254mm}
\setlength{\headsep}{0mm}
\setlength{\headheight}{0mm}
\setlength{\topskip}{0mm}
■gnuplotについて
3dの2d表現。
---------------------------------------------------------------
set pm3d map
set xrange[0:3984]
set yrange[0:127]
set zrange[-100:20]
set palette rgbformulae 22,13,-31
set xlabel "time[ms]"
set ylabel "k"
set format z ""
set format y ""
set zlabel "[db]\n\n"
splot "3d-aa-data.txt"
set term postscript eps enhanced color
set output "aa-3d.eps"
replot
---------------------------------------------------------------set xrange[0:3984]
set yrange[0:127]
set zrange[-100:20]
set palette rgbformulae 22,13,-31
set xlabel "time[ms]"
set ylabel "k"
set format z ""
set format y ""
set zlabel "[db]\n\n"
splot "3d-aa-data.txt"
set term postscript eps enhanced color
set output "aa-3d.eps"
replot
3d-aa-data.txt
---------------------------------------------------------------
# x y z
0 1 -50
0 6 -72
0 8 -75
・ ・ ・
・ ・ ・
・ ・ ・
---------------------------------------------------------------
0 件のコメント:
コメントを投稿