This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'); | |
http.createServer(function(req, res) { | |
if(req.url == '/') { | |
res.writeHead(200, {'Content-Type': 'text/html'}); | |
res.end(makeHtml()); | |
} else if(req.url == '/ajax302'){ | |
res.writeHead(302, { | |
'Content-Type': 'text/html', | |
//'Location': 'http://localhost:9000/forward' // alert 200 | |
'Location': 'https://github.com/join' // alert 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sed -i '289,$d' filename |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
honwhy@eos:images$ find . -size 0 | |
./18342-106vq6i | |
./16601-1bgsvrc | |
./16601-v389qr | |
./16601-1lsd6ei | |
./21398-haoave | |
./18342-zwtoqd | |
./18342-1404c4x | |
./20513-1b0wtmo | |
./18342-14g3r6i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
在终端输入的命令被记录在history中 | |
只是输入history就可以看到从前的命令 | |
如果要再次执行从前的命令,只要 !1725 | |
!linenumber 即可 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 在Linux终端使用sed命令,使用正则表达式时+没有被当作元字符 | |
# 1. 使用如下命令 | |
sed -i '/^[0-9]+/d' some.txt | |
cat some.txt | |
# 并不能够将数字开头的行删除 | |
# 2. 使用如下命令 | |
sed -i '/^[0-9]\+/d' some.txt |
NewerOlder