玩Linux五年积累的技巧(4) -- 软件


玩Linux五年积累的技巧(4) -- 软件
 
玩Linux五年积累的技巧(3) -- 系统(下)
http://www.2cto.com/os/201303/196221.html
 
1. Nautilus的技巧 
打开一个位置:Ctrl + L 
打开父目录:Ctrl + Up 
  www.2cto.com  
2.ubuntu的默认PDF阅读器evince中,'j'和'k'可以上下滚动 
 
3. 把图片缩小为原来的20%大小: 
Shell代码  
convert -resize 20%x20% IMGNAME NEWIMGNAME  
 
4. mplayer字符播放: 
Shell代码  
mplayer -vo aa xxx.avi用无颜色的字符播放;  
mplayer -vo caca xxx.avi用有颜色的ASCII字符播放;  
mplayer -vo matrixiew xxx.avi用类似黑客帝国里面的终端播放!  
 
5. 命令行下的截屏可以用软件fbgrab,延迟10s截屏: 
Shell代码  
fbgrab -s 10 screen.png  
 
6. virtualbox中克隆vdi文件: 
Shell代码  
VBoxManage clonevdi source.vdi target.vdi  
 
 
7. 好用的快捷操作软件:synapse 
 
8. 自定义的终端自动补全,比如我要对ssh, ping, myscript这三个命令自动补全参数,其中参数名都写在了/tmp/my_word_list文件中,我们可以在 .bashrc中做如下设置: 
Shell代码  
function _my_cmpl() {  
    local my_cmpl_words cur  
    COMPREPLY=()  
    cur="${COMP_WORDS[COMP_CWORD]}"  
    my_cmpl_words=`cat /tmp/my_word_list`  
    COMPREPLY=( $( compgen -W "$my_cmpl_words" -- "$cur" ) )  
}  
complete -F _my_cmpl ssh ping myscript  
 
 
9. ssh保存会话: 
vi /home/用户名/.ssh/config (没有就新建一个),加入以下内容: 
Shell代码  
Host *  
ControlMaster auto  
ControlPath /tmp/%r@%h:%p  
 
保存退出. 只要登录一次服务器,再在新的终端中登录同一个服务器时,就不用再输密码了。 
 
10. ssh翻the墙,如果你在墙外有台服务器,并且可以不用密码ssh到上面,则可以使用ssh做端口转发,实现翻the墙。加上Chrome上的switchy或者Firefox上的autoProxy插件就可以自由上网了。 
把本地的7001端口作为转发端口: 
Shell代码  
ssh -qTfnN -D 7001 root@YOUR_SERVER  
 

相关内容

    暂无相关文章