您的位置:首页 > 其它

liux终端的10条快捷命令

2013-04-13 13:38 134 查看
1. sudo !!

repeat run above command by root account

2.python -m SimpleHTTPServer

Set up a simple web server by use python,you can interview through http://$HOSTNAME:8000
3. :w !sudo tee %

No need previlege to save file into vim

4. cd -

change the directory to last time view,

note: cd

when you direct into cd ,you will return the user home directory

5. ^foo^bar

replace the previous in the command among "foo" to bar and run

6. cp filename{,.bak}

backup or copy file rapid

7. mtr google.com

this command assemble traceroute and ping

8. !whatever:p

mtr google.com
zhicai@zhicai:~$ !mtr:p
mtr google.com

Search the history command,but not execute

note: ctrl + r is search and execute

9. $ssh-copy-id user@host

copy ssh keys to user@host,so you can login without password

10. ffmpeg -f x11grab -s wxga -r 25 -i :0.0 -sameq /tmp/out.mpg

recording the desktop to video,

above all,install ffmeg:sudo apt-get install ffmpeg
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: