一、功能介绍:
1.收集服务器信息
主要收集服务器系统版本、IP地址、ARP连接、路由信息、密码信息、历史命令、当前权限、网络连接、进程信息、服务信息、SSH登录信息、环境变量、计划任务等多种信息。2.目录结构信息收集
主要对服务器上的目录结构进行信息收集,方便查看服务器的结构目录。3.关键词信息收集
通过在脚本中设置关键字,可以在服务器上搜索包含该关键字的文件,并将该文件所在的目录写入到指定文件中,然后我们可以通过查询该文件来访问指定目录,在配置文件中找到我们所需要的关键信息。二、使用方法:1.查看帮助
gather-h
2.常规扫描
gather-s
常规扫描主要扫描服务器信息,将结构输出到/tmp/report/result.txt中
3.全部扫描(建议使用)
gather-a
全部扫描会收集服务器信息、收集服务器目录结构、对关键字进行信息收集,并将结果输出到/tmp/report目录下,会生成tree.txt、result.txt、keyword.txt
4.结果输出
三、脚本代码:
#!/bin/bash
#exportpath
exportPATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/bin:/sbin/:$PATH
#createresultdir
RESULT_DIR=/tmp/report
mkdir-p${RESULT_DIR}
RESULT_FILE=${RESULT_DIR}/result.txt
RESULT_TREE=${RESULT_DIR}/tree.txt
RESULT_KEY=${RESULT_DIR}/keyword.txt
if[-f"$RESULT_FILE"];then
rm-rf${RESULT_FILE}
fi
if[-f"$RESULT_TREE"];then
rm-rf${RESULT_TREE}
fi
#catsystemversion
SYS_VER=`cat/proc/version`
sys_debian="Debian"
SSH_DIR=~/.ssh/
CON_DIR=/var/spool/cron/crontabs/
showip=`iprouteshow|grep-n'eth0s*protos*kernels*scopes*links*src'|sed's/^.*src//g'|seds/metric.*$//g`
userinfo=`foriin$(cut-d":"-f1/etc/passwd2>/dev/null);doid$i;done2>/dev/null`
#sensitivedata
a_dir=("/etc/""/opt/""/var/""/home/""/root/""/usr/")
#a_file=("redis.conf""mongodb.conf""server.xml""vsftpd.conf""ldap.conf""nginx.conf""apache2.conf""smb.conf")
#banner
echo-e"33[36m--------------------------------------------------------33[0m"
echo-e"33[31m██████╗█████╗████████╗██╗██╗███████╗██████╗33[0m"
echo-e"33[31m██╔════╝██╔══██╗╚══██╔══╝██║██║██╔════╝██╔══██╗33[0m"
echo-e"33[31m██║███╗███████║██║███████║█████╗██████╔╝33[0m"
echo-e"33[31m██║██║██╔══██║██║██╔══██║██╔══╝██╔══██╗33[0m"
echo-e"33[31m╚██████╔╝██║██║██║██║██║███████╗██║██║33[0m"
echo-e"33[31m╚═════╝╚═╝╚═╝╚═╝╚═╝╚═╝╚══════╝╚═╝╚═╝33[0m"
echo-e"33[36m--------------------------------------------------------33[0m"
echo
echo-e"33[31mLinuxServerProbeScript33[0m"
echo-e"33[31mHostname:33[0m33[32m`hostname`33[0m"
echo-e"33[31mKernel:33[0m33[32m`uname-m`33[0m"
echo-e"33[31mUser:33[0m33[32m`whoami`33[0m"
echo-e"33[31mIP:33[0m33[32m${showip}33[0m"
echo-e"33[31mReport:33[0m33[32m/tmp/report33[0m"
echo-e"33[31mHelp:33[0m33[32muse-h33[0m"
echo-e"33[36m-------------------------------33[0m"
#usage
usage(){echo"Usage:$0[-s][-a][-t][-k>]"1>&2;exit1;}
#checksystem
funsys()
{
os=`uname-o`
os_re=`uname-n`
os_ke=`uname-rv`
ver=$(echo$SYS_VER|grep"${sys_debian}")
if[["$ver"!=""]]
then
echo-e"OS:33[32m${os}${os_re}33[0m"
echo-e"Kernel:33[32m${os_ke}33[0m"
echo-e"33[36m-------------------------------33[0m"
echo-e"33[31mGatherStartat33[0m`date`"
echo-e"33[36m-------------------------------33[0m"
else
echo-e"OS:33[32m${os}${os_re}33[0m"
echo-e"Kernel:33[32m${os_ke}33[0m"
echo-e"33[36m-------------------------------33[0m"
echo-e"33[31mGatherStartat`date`...33[0m"
echo-e"33[36m-------------------------------33[0m"
fi
}
#dirstruct
funtree()
{
ifcommand-vtree>/dev/null2>&1;then
foriin${a_dir[@]}
do
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_TREE
echo-e"33[32m${i}33[0m">>$RESULT_TREE
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_TREE
tree${i}>>$RESULT_TREE2>&1
done
if[[$?-eq0]]
then
echo>>$RESULT_FILE
echo-e"33[31mGather33[0mdirectorystructureinfo......33[32mOK33[0m"
else
echo-e"33[31mGather33[0mdirectorystructureinfo......33[31mFAILED33[0m"
fi
else
forsin${a_dir[@]}
do
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_TREE
echo-e"33[32m${s}33[0m">>$RESULT_TREE
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_TREE
ls-R-t-s-a${s}>>tree.txt2>&1
done
if[[$?-eq0]]
then
echo>>$RESULT_FILE
echo-e"33[31mGather33[0mdirectorystructureinfo......33[32mOK33[0m"
else
echo-e"33[31mGather33[0mdirectorystructureinfo......33[31mFAILED33[0m"
fi
fi
}
#findkey
funkey()
{
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_KEY
echo-e"33[32mFindKeywordInfo33[0m">>$RESULT_KEY
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_KEY
#findthekeyword--pass
echo-e"33[32mIncludethekeyword--passInfo33[0m">>$RESULT_KEY
find/-maxdepth4-name*.conf-typef-execgrep-Hnpass{};>>$RESULT_KEY2>&1
find/-maxdepth4-name*.ini-typef-execgrep-Hnpass{};>>$RESULT_KEY2>&1
find/-maxdepth4-name*.log-typef-execgrep-Hnpass{};>>$RESULT_KEY2>&1
#findthekeyword--includecurrentuser
echo-e"33[32mIncludethekeyword--`whoami`Info33[0m">>$RESULT_KEY
find/-maxdepth4-name*.conf-typef-execgrep-Hn`whoami`{};>>$RESULT_KEY2>&1
find/-maxdepth4-name*.ini-typef-execgrep-Hn`whoami`{};>>$RESULT_KEY2>&1
find/-maxdepth4-name*.log-typef-execgrep-Hn`whoami`{};>>$RESULT_KEY2>&1
#findthekeyword--sqlserver
echo-e"33[32mIncludethekeyword--sqlserverInfo33[0m">>$RESULT_KEY
find/-maxdepth4-name*.conf-typef-execgrep-Hnmssql{};>>$RESULT_KEY2>&1
find/-maxdepth4-name*.conf-typef-execgrep-Hnsqlserver{};>>$RESULT_KEY2>&1
#findthekeyword--mysql
echo-e"33[32mIncludethekeyword--mysqlInfo33[0m">>$RESULT_KEY
find/-maxdepth4-name*.my.cnf-typef-execgrep-Hnmysql{};>>$RESULT_KEY2>&1
#findfilesthatweremodifiedwithin72hours
echo-e"33[32mweremodifiedwithin72hoursfileInfo33[0m">>$RESULT_KEY
find/-name"*.*"-ctime-2>>$RESULT_KEY2>&1
#findtheSUIDfilewithrootaccess
echo-e"33[32mtheSUIDfilewithrootaccessInfo33[0m">>$RESULT_KEY
find/-uid0-perm-4000-typef>>$RESULT_KEY2>&1
if[[$?-eq0]]
then
echo>>$RESULT_KEY
echo-e"33[31mGather33[0mfindkeywordinfo......33[32mOK33[0m"
else
echo-e"33[31mGather33[0mfindkeywordinfo......33[31mFAILED33[0m"
fi
}
#commonmode
funsip()
{
#releaseinformation
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
echo-e"33[32mReleaseInfo33[0m">>$RESULT_FILE
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
cat/etc/*-release>>$RESULT_FILE2>&1
cat/proc/version>>$RESULT_FILE2>&1
if[[$?-eq0]]
then
echo>>$RESULT_FILE
echo-e"33[31mGather33[0mreleaseinfo......33[32mOK33[0m"
else
echo-e"33[31mGather33[0mreleaseinfo......33[31mFAILED33[0m"
fi
#ifconfig
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
echo-e"33[32mIPAddressInfo33[0m">>$RESULT_FILE
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
ipaddressshow>>$RESULT_FILE2>&1
if[[$?-eq0]]
then
echo>>$RESULT_FILE
echo-e"33[31mGather33[0mipaddressinfo......33[32mOK33[0m"
else
echo-e"33[31mGather33[0mipaddressinfo......33[31mFAILED33[0m"
fi
#arp
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
echo-e"33[32mArpInfo33[0m">>$RESULT_FILE
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
arp-v>>$RESULT_FILE2>&1
if[[$?-eq0]]
then
echo>>$RESULT_FILE
echo-e"33[31mGather33[0marpinfo......33[32mOK33[0m"
else
echo-e"33[31mGather33[0marpinfo......33[31mFAILED33[0m"
fi
#route
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
echo-e"33[32mRouteInfo33[0m">>$RESULT_FILE
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
route-v>>$RESULT_FILE2>&1
if[[$?-eq0]]
then
echo>>$RESULT_FILE
echo-e"33[31mGather33[0mrouteinfo......33[32mOK33[0m"
else
echo-e"33[31mGather33[0mrouteinfo......33[31mFAILED33[0m"
fi
#/etc/passwd
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
echo-e"33[32mSystemPasswdFileInfo33[0m">>$RESULT_FILE
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
if["$userinfo"]
then
echo-e"
$userinfo">>$RESULT_FILE2>&1
else
:
fi
hashesinpasswd=`grep-v'^[^:]*:[x]'/etc/passwd2>/dev/null`
if["$hashesinpasswd"]
then
echo-e"e[00;33mItlookslikewehavepasswordhashesin/etc/passwd!e[00m
$hashesinpasswd">>$RESULT_FILE2>&1
else
:
fi
if[[$?-eq0]]
then
echo>>$RESULT_FILE
echo-e"33[31mGather33[0m/etc/passwd......33[32mOK33[0m"
else
echo-e"33[31mGather33[0m/etc/passwd......33[31mFAILED33[0m"
fi
#/etc/shadow
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
echo-e"33[32mSystemShadowFileInfo33[0m">>$RESULT_FILE
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
cat/etc/shadow>>$RESULT_FILE2>&1
if[[$?-eq0]]
then
echo>>$RESULT_FILE
echo-e"33[31mGather33[0m/etc/shadow......33[32mOK33[0m"
else
echo-e"33[31mGather33[0m/etc/shadow......33[31mFAILED33[0m"
fi
#/etc/sudoers
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
echo-e"33[32mSystemSudoersFileInfo33[0m">>$RESULT_FILE
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
cat/etc/sudoers2>/dev/null|grep-v-e'^$'|grep-v"#">>$RESULT_FILE2>&1
if[[$?-eq0]]
then
echo>>$RESULT_FILE
echo-e"33[31mGather33[0m/etc/sudoers......33[32mOK33[0m"
else
echo-e"33[31mGather33[0m/etc/sudoers......33[31mFAILED33[0m"
fi
#compgen
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
echo-e"33[32mUserexecutablecommandsFileInfo33[0m">>$RESULT_FILE
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
compgen-c>>$RESULT_FILE2>&1
if[[$?-eq0]]
then
echo>>$RESULT_FILE
echo-e"33[31mGather33[0mUserexecutablecommands......33[32mOK33[0m"
else
echo-e"33[31mGather33[0mUserexecutablecommands......33[31mFAILED33[0m"
fi
#passwordpolicyinformation
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
echo-e"33[32mPasswordpolicyInfo33[0m">>$RESULT_FILE
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
cat/etc/login.defs2>/dev/null|grep-v-e'^$'|grep-v"#">>$RESULT_FILE2>&1
if[[$?-eq0]]
then
echo>>$RESULT_FILE
echo-e"33[31mGather33[0m/etc/login.defs......33[32mOK33[0m"
else
echo-e"33[31mGather33[0m/etc/login.defs......33[31mFAILED33[0m"
fi
#/root
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
echo-e"33[32mChecksroothomedirectoryInfo33[0m">>$RESULT_FILE
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
ls-ahl/root/>>$RESULT_FILE2>&1
if[[$?-eq0]]
then
echo>>$RESULT_FILE
echo-e"33[31mGather33[0mroothomedirectory......33[32mOK33[0m"
else
echo-e"33[31mGather33[0mroothomedirectory......33[31mFAILED33[0m"
fi
#netstat
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
echo-e"33[32mNetStatus33[0m">>$RESULT_FILE
echo-e"33[36m------------------TCP---PORT------------------------33[0m">>$RESULT_FILE
netstat-antp>>$RESULT_FILE2>&1
echo-e"33[36m------------------UDP---PORT------------------------33[0m">>$RESULT_FILE
netstat-anup>>$RESULT_FILE2>&1
if[[$?-eq0]]
then
echo>>$RESULT_FILE
echo-e"33[31mGather33[0mnetstat......33[32mOK33[0m"
else
echo-e"33[31mGather33[0mnetstat......33[31mFAILED33[0m"
fi
#process
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
echo-e"33[32mProcessInfo33[0m">>$RESULT_FILE
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
psaux>>$RESULT_FILE2>&1
if[[$?-eq0]]
then
echo>>$RESULT_FILE
echo-e"33[31mGather33[0mprocessinfo......33[32mOK33[0m"
else
echo-e"33[31mGather33[0mprocessinfo......33[31mFAILED33[0m"
fi
#services
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
echo-e"33[32mServicesInfo33[0m">>$RESULT_FILE
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
cat/etc/services2>/dev/null|grep-v"#">>$RESULT_FILE2>&1
if[[$?-eq0]]
then
echo>>$RESULT_FILE
echo-e"33[31mGather33[0mservicesinfo......33[32mOK33[0m"
else
echo-e"33[31mGather33[0mservicesinfo......33[31mFAILED33[0m"
fi
#iptables
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
echo-e"33[32mIptablesInfo33[0m">>$RESULT_FILE
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
iptables-nL>>$RESULT_FILE2>&1
if[[$?-eq0]]
then
echo>>$RESULT_FILE
echo-e"33[31mGather33[0miptablesinfo......33[32mOK33[0m"
else
echo-e"33[31mGather33[0miptablesinfo......33[31mFAILED33[0m"
fi
#bashenv
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
echo-e"33[32mBashEnv33[0m">>$RESULT_FILE
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
echo-e"33[32mcurrentuser33[0m">>$RESULT_FILE
echo-e"33[36m-----------------------33[0m">>$RESULT_FILE
envinfo=`env2>/dev/null|grep-v'LS_COLORS'2>/dev/null`
if["$envinfo"]
then
echo-e"
$envinfo">>$RESULT_FILE2>&1
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
else
:
fi
cat~/.bashrc2>/dev/null|grep-v-e'^$'|grep-v"#">>$RESULT_FILE2>&1
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
echo$PATH>>$RESULT_FILE2>&1
echo-e"33[36m-----------------------33[0m">>$RESULT_FILE
echo-e"33[32msystemenvprofile33[0m">>$RESULT_FILE
echo-e"33[36m-----------------------33[0m">>$RESULT_FILE
cat/etc/profile2>/dev/null|grep-v-e'^$'|grep-v"#">>$RESULT_FILE2>&1
if[[$?-eq0]]
then
echo>>$RESULT_FILE
echo-e"33[31mGather33[0mbashenv......33[32mOK33[0m"
else
echo-e"33[31mGather33[0mbashenv......33[31mFAILED33[0m"
fi
#commandhistory
HISTFILE=~/.bash_history
exportHISTTIMEFORMAT="%Y-%m-%d:%H-%M-%S:"`whoami`":"
set-ohistory
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
echo-e"33[32mCommandHistory33[0m">>$RESULT_FILE
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
history>>$RESULT_FILE2>&1
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
cat$HISTFILE>>$RESULT_FILE2>&1
if[[$?-eq0]]
then
echo>>$RESULT_FILE
echo-e"33[31mGather33[0mcommandhistory......33[32mOK33[0m"
else
echo-e"33[31mGather33[0mcommandhistory......33[31mFAILED33[0m"
fi
#userlogininfo
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
echo-e"33[32mLoginInfo33[0m">>$RESULT_FILE
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
w>>$RESULT_FILE2>&1
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
last>>$RESULT_FILE2>&1
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
lastlog>>$RESULT_FILE2>&1
if[[$?-eq0]]
then
echo>>$RESULT_FILE
echo-e"33[31mGather33[0mlogininfo......33[32mOK33[0m"
else
echo-e"33[31mGather33[0mlogininfo......33[31mFAILED33[0m"
fi
#hosts
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
echo-e"33[32mHostsInfo33[0m">>$RESULT_FILE
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
find/etc/home-typef(-name"*.rhosts"-o-name"*.equiv")>>$RESULT_FILE2>&1
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
cat/etc/hosts>>$RESULT_FILE2>&1
if[[$?-eq0]]
then
echo>>$RESULT_FILE
echo-e"33[31mGather33[0mhostsinfo......33[32mOK33[0m"
else
echo-e"33[31mGather33[0mhostsinfo......33[31mFAILED33[0m"
fi
#fstab
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
echo-e"33[32mMountInfo33[0m">>$RESULT_FILE
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
cat/etc/fstab>>$RESULT_FILE2>&1
if[[$?-eq0]]
then
echo>>$RESULT_FILE
echo-e"33[31mGather33[0m/etc/fstab......33[32mOK33[0m"
else
echo-e"33[31mGather33[0m/etc/fstab......33[31mFAILED33[0m"
fi
#sshauthkeyconfig
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
echo-e"33[32mSSHAuthKeyConfig33[0m">>$RESULT_FILE
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
sshfiles=`find/(-name"id_dsa*"-o-name"id_rsa*"-o-name"known_hosts"-o-name"authorized_hosts"-o-name"authorized_keys")-execls-la{}2>/dev/null;`
if["$sshfiles"];then
echo-e"e[00;31mSSHkeys/hostinformationfoundinthefollowinglocations:e[00m
$sshfiles">>$RESULT_FILE2>&1
echo-e"
">>$RESULT_FILE2>&1
else
:
fi
if[-d"${SSH_DIR}"]
then
foriin`ls-1${SSH_DIR}>>$RESULT_FILE2>&1`
do
cat${SSH_DIR}${i}>>$RESULT_FILE2>&1
done
if[[$?-eq0]]
then
echo>>$RESULT_FILE
echo-e"33[31mGather33[0msshauthkey......33[32mOK33[0m"
else
echo-e"33[31mGather33[0msshauthkey......33[31mFAILED33[0m"
fi
else
echo-e"33[31mGather33[0msshauthkey......33[31mFAILED33[0m"
echo-e"33[31m.sshNosuchfileordirectory33[0m">>$RESULT_FILE
fi
#crontab
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
echo-e"33[32mCrontabConfig33[0m">>$RESULT_FILE
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
ls-al/etc/cron*>>$RESULT_FILE2>&1
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
cat/etc/rc.local>>$RESULT_FILE2>&1
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
cut-d":"-f1/etc/passwd|xargs-n1crontab-l-u>>$RESULT_FILE2>&1
echo-e"33[36m----------------------------------------------------33[0m">>$RESULT_FILE
if[-d"${CON_DIR}"]
then
foriin`ls-1${CON_DIR}>>$RESULT_FILE2>&1`
do
cat${CON_DIR}${i}>>$RESULT_FILE2>&1
done
if[[$?-eq0]]
then
echo>>$RESULT_FILE
echo-e"33[31mGather33[0mcrontab......33[32mOK33[0m"
else
echo-e"33[31mGather33[0mcrontab......33[31mFAILED33[0m"
fi
else
echo-e"33[31mGather33[0mcrontab......33[31mFAILED33[0m"
echo-e"33[31mNosuchfileordirectory33[0m">>$RESULT_FILE
fi
}
#getopts
#./gather-t10-s
whilegetoptsshtaARGS
do
case$ARGSin
s)
#commonmode
funsys
funsip
;;
a)
#all
funsys
funsip
funtree
funkey
;;
k)
#key
funsys
funkey
;;
t)
#dirstruct
funsys
funtree
;;
h)
#help
echo"CommonMode:-s"
echo"FullMode:-a"
echo"DirTreeMode:-t"
echo"FindKeywordMode:-k"
usage
;;
*)
#paramerror
echo"$1isnotanoption"
usage
;;
esac
done
Footer
审核编辑 :李倩
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。
举报投诉
-
Linux
+关注
关注
87文章
11296浏览量
209353 -
服务器
+关注
关注
12文章
9129浏览量
85341
原文标题:【收藏】Linux服务器信息收集工具,附脚本!
文章出处:【微信号:释然IT杂谈,微信公众号:释然IT杂谈】欢迎添加关注!文章转载请注明出处。
发布评论请先 登录
相关推荐
termius如何使用,termius如何使用的过程,linux服务器远程连接的实用教程
随着技术的不断进步,服务器远程连接技术也在不断提升其性能和安全性,以满足企业日益增长的需求。本文将和大家一起讨论termius如何使用的过程以及Linux远程桌面
如何在Linux系统上设置站群服务器IP地址
在Linux系统上设置站群服务器的IP地址,可以通过以下步骤进行,主机推荐小编为您整理发布如何在Linux系统上设置站群服务器IP地址。
如何使用 Mobaxterm 建立 Linux 服务器连接
不同的会话类型。为了连接到 Linux 服务器,你可以选择以下会话类型之一: SSH :用于安全地连接到远程服务器。 Telnet :不安全的连接方式,不推荐使用,
云服务器的功能是信息备份吗?有哪些优势
服务器的功能是信息备份吗?云服务器的功能不仅限于信息备份,它涵盖了计算、存储、网络、数据共享、安全和高可用性等多个方面。它通过虚拟化技术实现资源池化,支持弹性计算和可扩展存储,满足不同
服务器数据恢复—Linux网站服务器硬盘出现坏扇区的数据恢复案例
服务器数据恢复环境:
一台linux操作系统网站服务器,该服务器上部署了几十个网站,使用一块SATA硬盘。
服务器故障&原因:
如何优化Linux服务器的性能
优化Linux服务器的性能是一个综合性的任务,涉及硬件、软件、配置、监控等多个方面。以下是一个详细的指南,旨在帮助系统管理员和运维人员提升Linux服务器的性能和稳定性。
Linux服务器性能查看方法
Linux服务器性能查看是系统管理员和开发人员在日常工作中经常需要进行的任务,以确保系统稳定运行并优化资源使用。以下将详细介绍多种Linux服务器性能查看的方法,这些方法涵盖了CPU、
服务器数据恢复—xfs文件系统服务器数据恢复案例
某公司一台服务器,连接了一台存储。该服务器安装linux操作系统,文件系统为xfs。
在运行过程中该服务器出现故障,管理员使用xfs_repair
在Linux服务器上使用IAR Build Tools实现DevOps和CI/CD
Linux服务器上使用IAR工具,IAR于2020年推出了可以在Linux服务器上运行的IAR Build Tools。IAR Build
云服务器linux搭建ftp服务访问不了怎么解决?
如果你在云服务器linux上搭建了FTP服务但无法访问,这可能是由于几种原因引起的。以下是一些常见问题和解决方法: 1、防火墙配置:确保防火墙允许FTP流量通过。FTP服务器通常使用端
服务器操作系统有几种?
:微软官方信息发布,从Windows Server 2008 R2刚开始,Windows Server不要出示32位版本号。
二、网络服务器Linux电脑操作系统
自然环境布署
发表于 03-29 16:59
云服务器的linux中如何搭建php运行环境?
要在云服务器的Linux系统上搭建PHP运行环境,您可以按照以下步骤进行: 1、安装PHP: 使用包管理工具(如apt、yum等)安装PHP及其相关模块。例如,在Ubuntu系统上,您可以运行以下
【服务器数据恢复】硬盘坏道掉线导致服务器崩溃的数据恢复案例
服务器数据恢复环境:
一台IBM某型号服务器上有16块FC硬盘组建RAID阵列。上层linux操作系统,ext3文件系统,部署有oracle数据库。
服务器故障&检测:
linux服务器和windows服务器
较为熟悉,需要高性能和稳定性,并且希望能够进行自定义配置和更好的安全性,那
么Linux服务器是一个不错的选择。
而如果你对服务器操作系统不太熟悉,需要广泛的应用支持和易用的管理工具,
发表于 02-22 15:46
评论