
Linux Shell
iteye_3843
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Redirect port from 8080 to 80 in linux server(1)
[code="java"]iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080[/code]查看配置是否成功[code="java"]# iptables -t nat -L[/code]Chain PREROUTING (policy ACCEPT)target prot ...原创 2013-09-18 14:09:46 · 114 阅读 · 0 评论 -
Redirect port from 8080 to 80 in linux server(2)
如果没有安装iptables该怎么办呢?在/etc/xinetd.d下加入http服务[code="java"]service http{ disable = no socket_type = stream wait = no redirect = 127.0.0.1 8080 log_type = FILE logpath}[/code]重启/...原创 2013-09-22 16:30:35 · 138 阅读 · 0 评论 -
Shell script中使用getopt例子
使用getopt可以非常方便的格式话选项跟对应的参数,例子如下[code="shell"]#!/bin/bashset -- `getopt -q ab:c "$@"`while [ -n "$1" ]do case "$1" in -a) echo "option -a";; -b) value="$2" echo &qu原创 2013-01-16 15:34:51 · 370 阅读 · 0 评论 -
用sed命令模拟tac
原始数据[code="shell"]cat data[/code]This is the header line.This is the first data line.This is the second data line.This is the last line.[code="shell"]tac data[/code]This is the last li...原创 2013-02-01 15:58:59 · 214 阅读 · 0 评论 -
curl 参数速记
Usage: curl [options...] Options: (H) means HTTP/HTTPS only, (F) means FTP only --anyauth Pick "any" authentication method (H) -a, --append Append to target file when uploading ...原创 2014-07-02 14:43:29 · 322 阅读 · 0 评论