linux 命令汇总

这里汇总一下平时用到的一些命令,方便需要的时候查询,不定期编辑
[b][size=medium]1. 计算一个字符串的md5[/size][/b]
echo -n 'the_password' | md5sum -

[quote][color=red]"-n" is supplied to force echo not to add a newline character automatically behind the string[/color][/quote]
md5sum也可以换成sha*sum,比如sha256sum等

[b][size=medium]2. There are stopped jobs.[/size][/b]
这个消息是在推出控制台的时候碰到的,搜了下,然后才想起每次编辑某个文件又想看下log的时候,并不总是需要把vim退出:在运行某个程序的时候,按Ctrl-z可以把程序“挂起”(suspend),然后干点别的事情,然后再把程序调出来继续运行,在终端输入
jobs

可以看到被挂起的程序列表,
vivi@H0334:~$ jobs
[1]- Stopped vim
[2]+ Stopped vim c.html

然后可以输入
fg $jobid

继续运行程序,$jobid就是输入jobs出现的列表的前面那个数字
[quote]Unix allows you to suspend a program you are running and then go back to it later on. This is called "job control". When you are using a program interactively, it is said to be in the "foreground"; once it is stopped (with [CTRL-Z]) it is in the "background". At this point you can put the job back into the foreground by typing "fg", or tell it to continue to run in the background with "bg". The shell gives a number to each job that is running in the background or that has been stopped. To see the list of current jobs, type "jobs". Each job will be listed, preceded by its number. The job most recently stopped is referred to as the current job and will have a + sign in front of it. You can kill a job by typing:
 kill %n 

where n is the number of the job. A job left running in the background will stop when it needs input from the terminal. [/quote]
[b]
使用wget创建一个站点的镜像[/b]
wget -mk http://www.example.com/
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值