linux 命令汇总

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

   
引用
"-n" is supplied to force echo not to add a newline character automatically behind the string

    md5sum也可以换成sha*sum,比如sha256sum等

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

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

    然后可以输入
fg $jobid

继续运行程序,$jobid就是输入jobs出现的列表的前面那个数字
引用
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.


使用wget创建一个站点的镜像

wget -mk http://www.example.com/

你可能感兴趣的:(apache,tomcat,应用服务器,linux,vim)