??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲一区二区高清,久久久久久久久久久久电影 ,久色国产在线http://www.aygfsteel.com/paulwong/category/55363.htmlzh-cnMon, 06 Jan 2025 10:55:21 GMTMon, 06 Jan 2025 10:55:21 GMT60linux删除多余的旧内核http://www.aygfsteel.com/paulwong/archive/2025/01/05/451537.htmlpaulwongpaulwongSun, 05 Jan 2025 04:01:00 GMThttp://www.aygfsteel.com/paulwong/archive/2025/01/05/451537.htmlhttp://www.aygfsteel.com/paulwong/comments/451537.htmlhttp://www.aygfsteel.com/paulwong/archive/2025/01/05/451537.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/451537.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/451537.html
dnf remove $(dnf repoquery --installonly --latest-limit=-2)




paulwong 2025-01-05 12:01 发表评论
]]>
REDHEAD 8 LINUX 软g集合http://www.aygfsteel.com/paulwong/archive/2022/06/23/450773.htmlpaulwongpaulwongThu, 23 Jun 2022 09:27:00 GMThttp://www.aygfsteel.com/paulwong/archive/2022/06/23/450773.htmlhttp://www.aygfsteel.com/paulwong/comments/450773.htmlhttp://www.aygfsteel.com/paulwong/archive/2022/06/23/450773.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/450773.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/450773.htmlhttps://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/deploying_different_types_of_servers/index




paulwong 2022-06-23 17:27 发表评论
]]>
LINUX YUMhttp://www.aygfsteel.com/paulwong/archive/2022/06/23/450772.htmlpaulwongpaulwongThu, 23 Jun 2022 09:21:00 GMThttp://www.aygfsteel.com/paulwong/archive/2022/06/23/450772.htmlhttp://www.aygfsteel.com/paulwong/comments/450772.htmlhttp://www.aygfsteel.com/paulwong/archive/2022/06/23/450772.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/450772.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/450772.html
yum module list nginx

Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
Name                                         Stream                                         Profiles                                         Summary
nginx                                        1.14 [d]                                       common [d]                                       nginx webserver
nginx                                        1.16                                           common [d]                                       nginx webserver
nginx                                        1.18                                           common [d]                                       nginx webserver
nginx                                        1.20 [e]                                       common [d]                                       nginx webserver

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled


讑֮某个版本为默认版?br />
yum module enable nginx:1.20


安装默认版本
yum install nginx





paulwong 2022-06-23 17:21 发表评论
]]>
openJDK无法q行jmaphttp://www.aygfsteel.com/paulwong/archive/2022/05/19/450751.htmlpaulwongpaulwongThu, 19 May 2022 05:53:00 GMThttp://www.aygfsteel.com/paulwong/archive/2022/05/19/450751.htmlhttp://www.aygfsteel.com/paulwong/comments/450751.htmlhttp://www.aygfsteel.com/paulwong/archive/2022/05/19/450751.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/450751.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/450751.htmlhttps://blog.csdn.net/qq_32447301/article/details/85109014


paulwong 2022-05-19 13:53 发表评论
]]>
LINUX下@环读取文件参数ƈCURLq程APIhttp://www.aygfsteel.com/paulwong/archive/2021/08/26/435954.htmlpaulwongpaulwongThu, 26 Aug 2021 07:40:00 GMThttp://www.aygfsteel.com/paulwong/archive/2021/08/26/435954.htmlhttp://www.aygfsteel.com/paulwong/comments/435954.htmlhttp://www.aygfsteel.com/paulwong/archive/2021/08/26/435954.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/435954.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/435954.html
参数文gQtest1.json
{"ADDRESS_FREE":"XXX","NAME":{"SURNAME":"XXX","FIRST_NAME":"XXX"}}
{"ADDRESS_FREE":"XXX","NAME":{"SURNAME":"XXX","FIRST_NAME":"XXX"}}
{"ADDRESS_FREE":"XXX","NAME":{"SURNAME":"XXX","FIRST_NAME":"XXX"}}

test1.sh
#! /bin/bash

RESULT_FILE="result.csv"
echo "" > $RESULT_FILE
i=1
while read line || [[ "$line" ]] #In case the file has an incomplete (missing newline) last line, you could use this alternative:
do 
    echo "$i"
    printf "$i;$line;" >> $RESULT_FILE
    curl -w %{time_total} -o /dev/null -X POST -H "Content-Type:application/json" -d "$line" http://ip:port  >> $RESULT_FILE
    #printf "\n\r" >> $RESULT_FILE
    echo "" >> $RESULT_FILE
    #i=$(( $i + 1 ))
    (( i++ ))
done < test1.json

Reference:
https://stackoverflow.com/questions/30988586/creating-an-array-from-a-text-file-in-bash











paulwong 2021-08-26 15:40 发表评论
]]>
Linux sha512sum commandhttp://www.aygfsteel.com/paulwong/archive/2021/07/14/435926.htmlpaulwongpaulwongWed, 14 Jul 2021 05:41:00 GMThttp://www.aygfsteel.com/paulwong/archive/2021/07/14/435926.htmlhttp://www.aygfsteel.com/paulwong/comments/435926.htmlhttp://www.aygfsteel.com/paulwong/archive/2021/07/14/435926.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/435926.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/435926.html
sha512sum [OPTION] [FILE]



paulwong 2021-07-14 13:41 发表评论
]]>
Bash get filename from given path on Linux or Unixhttp://www.aygfsteel.com/paulwong/archive/2021/05/21/435879.htmlpaulwongpaulwongFri, 21 May 2021 06:10:00 GMThttp://www.aygfsteel.com/paulwong/archive/2021/05/21/435879.htmlhttp://www.aygfsteel.com/paulwong/comments/435879.htmlhttp://www.aygfsteel.com/paulwong/archive/2021/05/21/435879.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/435879.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/435879.htmlhttps://www.cyberciti.biz/faq/bash-get-filename-from-given-path-on-linux-or-unix/

paulwong 2021-05-21 14:10 发表评论
]]>
TCP 連線狀態機制與程http://www.aygfsteel.com/paulwong/archive/2020/12/29/435758.htmlpaulwongpaulwongTue, 29 Dec 2020 02:04:00 GMThttp://www.aygfsteel.com/paulwong/archive/2020/12/29/435758.htmlhttp://www.aygfsteel.com/paulwong/comments/435758.htmlhttp://www.aygfsteel.com/paulwong/archive/2020/12/29/435758.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/435758.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/435758.htmlhttps://dev.twsiyuan.com/2017/09/tcp-states.html
在開發基?HTTP 的網路應用服務時Q當有大量連線要求Q或是與長連線 (Persistent connection) 要求時,常常遇到底層 TCP 的連線L錯誤Q導致服務不I定。因此研I了?TCP 的連線狀態機Ӟ並嘗試用自己的方式整理筆a,希望能從基礎知識中找到解決錯誤的R烦Q或是Q何能更進一步優化服務的手段?/p>

僅紀?TCP 連線狀態以及徏立或是斷開連線程Q關於進一步的 TCP 包協定可參?Reference 連線?/p>

TCP 建立連線 (Open)

通常?TCP 連線建立程與狀態,需要三ơ的a息交換來徏立連線 (three-way handshaking)Q?/p>

TCP 建立連線程? src=

TCP 建立連線程?/p>

其中左邊通常?serverQ右邊則?clientQ文字流E描qͼ

  1. Server 建立 TCBQ開啟監聽連線Q進入狀?LISTENING
  2. Client 發出連線要求 SYNQ進入狀?SYN-SENTQ等待回?/li>
  3. Server 收到 SYN 要求Q回應連線傳?nbsp;SYN+ACKQ並進入狀?SYN-RCVD (SYN-RECEIVED)
  4. Client 收到 SYN+ACK 完成連線進入狀?ESTABLISHEDQ並送出 ACK
  5. Server 收到 ACK 連線完成Q也進入狀?ESTABLISHED
  6. 雙方開始傳送交換資?/li>

該些名詞與狀態說明:

  • CLOSEDQ連線關閉狀?/li>
  • LISTENINGQ監聽狀態,被動{待連線
  • SYN-SENTQ主動送出連線要求 SYNQ並{待方回應
  • SYN-RCVDQ收到連線要求 SYNQ送出己方?SYN+ACK 後,{待方回應
  • ESTABLISHEDQ確定完成連線Q可開始傌資料
  • TCBQTransmission Control BlockQsee wiki
  • SYNQSynchronousQ表C方建立連線的同步符?/li>
  • ACKQAcknowledgementQ表C發送的數據已收到無?/li>

在徏立連線時,可能會發生雙方同步徏立連線的情?(Simultaneous open)Q常見於 P2P 的應用中Q其 TCP 建立連線的流E不太一樣:

TCP 同步建立連線程? src=

TCP 同步建立連線程?/p>

畫成 TCP 狀態流E圖會是這樣Q?/p>

TCP Open 狀態圖

TCP Open 狀態圖

TCP 斷開連線 (Close)

TCP 關閉程如下Q比建立連線還要複雜一些,需要經過四ơ的a息交換 (four-way handshaking)Q要注意的是可以是由 server Dvd關閉Q抑或是 client Dvd關閉Q?/p>

TCP 關閉連線程? src=

TCP 關閉連線程?/p>

其中左邊通常?client 狀?(?client dDv關閉連線)Q右邊則?server 狀態,文字程描述Q?/p>

  1. Client 準備關閉連線Q發?nbsp;FINQ進入狀?FIN-WAIT-1
  2. Server 收到 FINQ發回收到的 ACKQ進入狀?CLOSE-WAITQ並通知 App 準備L
  3. Client 收到 ACKQ進入狀?FIN-WAIT-2Q等?server 發出 FIN
  4. Server App 處理完斷R請求,發出 FINQ並進入狀?LAST-ACK
  5. Client 收到 FINQ並回傳?nbsp;ACKQ進入狀?TIME-WAITQ等待時間過後正式關閉連線
  6. Server 收到 ACKQ便直接關閉連線

該些名詞與狀態說明:

  • ESTABLISHEDQ連線開啟狀?/li>
  • CLOSE-WAITQ等待連線關閉狀態,{待 App 回應
  • LAST-ACKQ等待連線關閉狀態,{待遠端回應 ACK 後,侉K閉連線
  • FIN-WAIT-1Q等待連線關閉狀態,{待遠端回應 ACK
  • FIN-WAIT-2Q等待連線關閉狀態,{待遠端回應 FIN
  • TIME-WAITQ等待連線關閉狀態,{段一D|候,保證遠端有收到其 ACK 關閉連線 (E\廉問題)
  • CLOSEDQ連線關閉狀?/li>
  • FINQ表C關閉連線的同步符?/li>
  • ACKQAcknowledgementQ表C發送的數據已收到無?/li>

有可能連線的雙方同時發起關閉,雖然率還蠻低的Q?/p>

TCP 同步關閉連線程? src=

TCP 同步關閉連線程?/p>

這邊多一個狀態:

  • CLOSINGQ等待連線關閉狀態,{待遠端回應 ACK

畫成 TCP 狀態流E圖會是這樣Q?/p>

TCP Close 狀態圖

TCP Close 狀態圖

查詢珑֜電腦?TCP 狀?/h2>

查詢目前所有的連線狀?(Windows & Linux)Q?/p>

netstat -a

Reference



paulwong 2020-12-29 10:04 发表评论
]]>
LINUX SHELL之SCLhttp://www.aygfsteel.com/paulwong/archive/2020/11/05/435715.htmlpaulwongpaulwongThu, 05 Nov 2020 08:42:00 GMThttp://www.aygfsteel.com/paulwong/archive/2020/11/05/435715.htmlhttp://www.aygfsteel.com/paulwong/comments/435715.htmlhttp://www.aygfsteel.com/paulwong/archive/2020/11/05/435715.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/435715.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/435715.htmlhttps://blog.51cto.com/hashlinux/1772066

CentOS/RHEL 开发环境之 devtoolset
http://blog.fungo.me/2016/03/centos-development-env/

How can I make a Red Hat Software Collection persist after a reboot/logout?
https://access.redhat.com/solutions/527703

paulwong 2020-11-05 16:42 发表评论
]]>
linux shell 中检查文件夹是否存在http://www.aygfsteel.com/paulwong/archive/2020/09/25/435673.htmlpaulwongpaulwongFri, 25 Sep 2020 03:11:00 GMThttp://www.aygfsteel.com/paulwong/archive/2020/09/25/435673.htmlhttp://www.aygfsteel.com/paulwong/comments/435673.htmlhttp://www.aygfsteel.com/paulwong/archive/2020/09/25/435673.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/435673.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/435673.html
if [ -d "$DIRECTORY" ]; then
  # Control will enter here if $DIRECTORY exists.
fi

Or to check if a directory doesn't exist:
if [ ! -d "$DIRECTORY" ]; then
  # Control will enter here if $DIRECTORY doesn't exist.
fi


paulwong 2020-09-25 11:11 发表评论
]]>
linux shell 中函数的调用http://www.aygfsteel.com/paulwong/archive/2020/09/25/435672.htmlpaulwongpaulwongFri, 25 Sep 2020 03:06:00 GMThttp://www.aygfsteel.com/paulwong/archive/2020/09/25/435672.htmlhttp://www.aygfsteel.com/paulwong/comments/435672.htmlhttp://www.aygfsteel.com/paulwong/archive/2020/09/25/435672.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/435672.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/435672.htmlfunction fun1(){
  return 34
}

function fun2(){
  local res=$(fun1)
  echo $res
}
上面调用fun1Ӟ打印l果却不q回34Q这是ؓ何?原来函数只是q回l果成功与否的|q不能自定义。因此要Ҏ下面q种写法

function fun1(){
  echo 34
}

function fun2(){
  local res=$(fun1)
  echo $res
}

https://stackoverflow.com/questions/17336915/return-value-in-a-bash-function


paulwong 2020-09-25 11:06 发表评论
]]>
向所有服务器发送相同命?/title><link>http://www.aygfsteel.com/paulwong/archive/2020/09/24/435670.html</link><dc:creator>paulwong</dc:creator><author>paulwong</author><pubDate>Thu, 24 Sep 2020 02:52:00 GMT</pubDate><guid>http://www.aygfsteel.com/paulwong/archive/2020/09/24/435670.html</guid><wfw:comment>http://www.aygfsteel.com/paulwong/comments/435670.html</wfw:comment><comments>http://www.aygfsteel.com/paulwong/archive/2020/09/24/435670.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/paulwong/comments/commentRss/435670.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/paulwong/services/trackbacks/435670.html</trackback:ping><description><![CDATA[先在L机执行ssh-keygenQ再向被控机传输keyQ?br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->ssh-copy-id -i ~/.ssh/id_rsa.pub user1@ip</div><br />样例脚本transfer-artemis.sh如下Q?br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->#!/bin/bash<br /><br />loop_server(){<br />    for ((i=2<span style="color: #008000; ">;</span><span style="color: #008000; "> i<=8; i++))</span><span style="color: #008000; "><br /></span>    do<br />      ipd=10.10.31.1${i}2<br />      echo ${ipd}<br />      $1 ${ipd}<br />    done<br />    <br />    for ((i=1<span style="color: #008000; ">;</span><span style="color: #008000; "> i<=2; i++))</span><span style="color: #008000; "><br /></span>    do<br />      ipd=10.20.31.1${i}2<br />      echo ${ipd}<br />      $1 ${ipd}<br />    done<br />    <br />}<br /><br />start_artemis_cmd(){<br />    echo "ssh user1@${1} '/opt/myapp/artemis/apache-artemis-2.15.0/instance/bin/artemis-service start'"<br />    ssh user1@${1} '/opt/myapp/artemis/apache-artemis-2.15.0/instance/bin/artemis-service start'<br />}<br /><br />stop_artemis_cmd(){<br />    echo "ssh user1@${1} '/opt/myapp/apache-activemq-5.15.10/bin/activemq stop'"<br />    echo "ssh user1@${1} '/opt/myapp/artemis/apache-artemis-2.15.0/instance/bin/artemis-service stop'"<br />    ssh user1@${1} '/opt/myapp/apache-activemq-5.15.10/bin/activemq stop'<br />    ssh user1@${1} '/opt/myapp/artemis/apache-artemis-2.15.0/instance/bin/artemis-service stop'<br />}<br /><br />scp_artemis_cmd(){<br />    echo "ssh user1@${1} 'rm -rf /opt/myapp/artemis'"<br />    echo "scp -r /opt/myapp/artemis user1@${1}:/opt/myapp/"<br />    ssh user1@${1} 'rm -rf /opt/myapp/artemis'<br />    scp -r /opt/myapp/artemis user1@${1}:/opt/myapp/<br />}<br /><br />stop_artemis(){<br />    loop_server stop_artemis_cmd<br />}<br /><br />start_artemis(){<br />    loop_server start_artemis_cmd<br />}<br /><br />scp_artemis(){ <br />    loop_server scp_artemis_cmd<br />}<br /><br />#start_artemis "Hello start_artemis"<br /><br />$1</div><br />执行命oQ?br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->./transfer-artemis.sh start_artemis</div><img src ="http://www.aygfsteel.com/paulwong/aggbug/435670.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/paulwong/" target="_blank">paulwong</a> 2020-09-24 10:52 <a href="http://www.aygfsteel.com/paulwong/archive/2020/09/24/435670.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>linux nohup命o详解http://www.aygfsteel.com/paulwong/archive/2020/09/02/435652.htmlpaulwongpaulwongWed, 02 Sep 2020 03:52:00 GMThttp://www.aygfsteel.com/paulwong/archive/2020/09/02/435652.htmlhttp://www.aygfsteel.com/paulwong/comments/435652.htmlhttp://www.aygfsteel.com/paulwong/archive/2020/09/02/435652.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/435652.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/435652.html
nohup命oQ如果你正在q行一个进E,而且你觉得在退出帐h该进E还不会l束Q那么可以用nohup命o。该命o可以在你退出帐?关闭l端之后l箋q行相应的进E。nohup是不挂L意? n ohang up)?br />
一般都是在linux下nohup格式Q?nbsp; 

nohup command

或?br />
nohup command &

q之间的差别是带&的命令行Q即使terminalQ终端)关闭Q或者电脑死机程序依然运行(前提是你把程序递交到服务器上)Q?br />
它把标准输出QSTDOUTQ和标准错误QSTDERRQ结果输出到nohup.txt文gq个看似很方便,但是当输出很大的时候,nohup.txt文g会非常大Q或者多个后台命令的时候大安会输出到nohup.txt文gQ不利于查找l果和调试程序?br />
所以能够重定向输出会非常方ѝ下面要介绍标准输出Q标准输?和标准错误了?br />
其实我们一直都在用Q只是没有注意到Q?nbsp;

比如

>./command.sh > output

#q其中的>是标准输出W号Q其实是 1>output 的羃?br />
>./command.sh 2> output

Q这里的2>是标准错误输出到output文g里?br />
?< 则是标准输入了?br />
下面步入正题Q重定向后台命o

>nohup ./command.sh > output 2>&1 &

解释Q前面的nohup 和后面的&我想大家都能明白了把?br />
主要是中间的 2>&1的意?br />
q个意思是把标准错误(2Q重定向到标准输ZQ?Q,而标准输出又导入文goutput里面Q?  www.2cto.com

所以结果是标准错误和标准输出都导入文goutput里面了?br />
至于Z么需要将标准错误重定向到标准输出的原因,那就归结为标准错误没有缓冲区Q而stdout有?br />
q就会导?>output 2>output 文goutput被两ơ打开Q而stdout和stderr会竞争覆盖Q这肯定不是我门惌?

q就是ؓ什么有Z写成Q?br />
nohup ./command.sh >output 2>output
出错的原因了

##########################

最后谈一?dev/null文g的作?br />
q是一个无底洞QQ何东襉K可以定向到这里,但是却无法打开?br />
所以一般很大的stdou和stderr当你不关心的时候可以利用stdout和stderr定向到这?br />
>./command.sh >/dev/null 2>&1


paulwong 2020-09-02 11:52 发表评论
]]>
如何扑ևLINUX中消耗CPU最大的应用的PIDhttp://www.aygfsteel.com/paulwong/archive/2020/08/14/435642.htmlpaulwongpaulwongFri, 14 Aug 2020 03:52:00 GMThttp://www.aygfsteel.com/paulwong/archive/2020/08/14/435642.htmlhttp://www.aygfsteel.com/paulwong/comments/435642.htmlhttp://www.aygfsteel.com/paulwong/archive/2020/08/14/435642.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/435642.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/435642.html
top -i //输出应用列表Qƈ隐藏IDEL的应?br /> P //在列表时Q按PQ则按CPU的用排?/div>

How To Check CPU Utilization In Linux With Command Line
https://phoenixnap.com/kb/check-cpu-usage-load-linux

paulwong 2020-08-14 11:52 发表评论
]]>LINUX SHELLhttp://www.aygfsteel.com/paulwong/archive/2020/07/06/435591.htmlpaulwongpaulwongMon, 06 Jul 2020 01:23:00 GMThttp://www.aygfsteel.com/paulwong/archive/2020/07/06/435591.htmlhttp://www.aygfsteel.com/paulwong/comments/435591.htmlhttp://www.aygfsteel.com/paulwong/archive/2020/07/06/435591.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/435591.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/435591.htmlhttps://tecadmin.net/tutorial/bash-scripting/

Shell 教程
https://www.runoob.com/linux/linux-shell.html

Check existence of input argument in a Bash shell script
https://stackoverflow.com/questions/6482377/check-existence-of-input-argument-in-a-bash-shell-script

How to Check if a File or Directory Exists in Bash
https://linuxize.com/post/bash-check-if-file-exists/

bash string compare to multiple correct values
https://stackoverflow.com/questions/21157435/bash-string-compare-to-multiple-correct-values

Bash – Check If Two Strings are Equal
https://tecadmin.net/tutorial/bash/examples/check-if-two-strings-are-equal/





paulwong 2020-07-06 09:23 发表评论
]]>
Linux查看E序端口占用情况http://www.aygfsteel.com/paulwong/archive/2014/10/13/418668.htmlpaulwongpaulwongMon, 13 Oct 2014 03:52:00 GMThttp://www.aygfsteel.com/paulwong/archive/2014/10/13/418668.htmlhttp://www.aygfsteel.com/paulwong/comments/418668.htmlhttp://www.aygfsteel.com/paulwong/archive/2014/10/13/418668.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/418668.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/418668.html今天发现服务器上Tomcat 8080端口起不来,老提C端口已l被占用?/p>

使用命oQ?/p>

ps -aux | grep tomcat

发现q没?080端口的Tomcatq程?/p>

使用命oQnetstat –apn

查看所有的q程和端口用情c发C面的q程列表Q其中最后一栏是PID/Program name 

clip_image002

发现8080端口被PID?658的Javaq程占用?/p>

q一步用命令:ps -aux | grep javaQ或者直接:ps -aux | grep pid 查看

clip_image004

可以明知?080端口是被哪个E序占用了!然后判断是否使用KILL命oq掉Q?br style="margin: 0px; padding: 0px;" />

Ҏ二:直接使用 netstat   -anp   |   grep  portno
卻Inetstat –apn | grep 8080



paulwong 2014-10-13 11:52 发表评论
]]>
վ֩ģ壺 | | | Ԫ| | ϳ| ˺| | ǭ| | ɽ| ҳ| Ȩ| | | | | ˮ| | Ȫ| ˰| | | ѳ| ½| º| | | | | | | Ҿ| ײ| ؼ| Ҫ| ˮ| | | | |