centos-命令

Linux相关的操作命令

摘要:centos系统下的各种命令

查看今天并罗列(---征信征信征信征信 ---)

查找今天修改的 .php 文件并排除任何名为 runtime 的目录中的文件,你可以使用 find 命令结合 -path 和 -prune 选项来实现。

26.1.7~新版本-昨天0点到现在为止的

find . \( -path "*/runtime" -o -path "*/.git" -o -path "*/node_modules" \) -prune -o -type f \( -iregex ".*\.\(php[3-8]?\|phtml\|phar\|pht\|cer\|aspx?\|asa\|ashx\|jspx?\|ini\|sh\|bat\|js\|html?\|txt\)" -o -name ".htaccess" \) \( -newermt "yesterday 00:00" -o -newerct "yesterday 00:00" \) -printf "%TY-%Tm-%Td %TH:%TM\t%CY-%Cm-%Cd %CH:%CM\t%u\t%m\t%p\n" 2>/dev/null | sort

上周天中午现在

find . \( -path "*/runtime" -o -path "*/.git" -o -path "*/node_modules" \) -prune -o -type f \( -iregex ".*\.\(php[3-8]?\|phtml\|phar\|pht\|cer\|aspx?\|asa\|ashx\|jspx?\|ini\|sh\|bat\|js\|html?\|txt\)" -o -name ".htaccess" \) \( -newermt "$(date -d '7 days ago' +%F) 00:00" -o -newerct "$(date -d '7 days ago' +%F) 00:00" \) -printf "%TY-%Tm-%Td %TH:%TM\t%CY-%Cm-%Cd %CH:%CM\t%u\t%m\t%p\n" 2>/dev/null | sort

前天00点到现在为止的

find . -path "*/runtime" -prune -o -type f \( -name "*.php" -o -name "*.cer" -o -name "*.ashx" -o -name "*.jsp" -o -name "*.ini" -o -name "*.txt" -o -name "*.bat" -o -name "*.js" -o -name "*.asp" -o -name "*.html" -o -name "*.htm" \) \( -newermt "2 days ago 00:00" -o -newerct "2 days ago 00:00" \) -printf "%TY-%Tm-%Td %TH:%TM \t %p\n" | sort

新版本-昨天0点到现在为止的(所有格式文件)

find . -path "*/runtime" -prune -o -type f \( -newermt "yesterday 00:00" -o -newerct "yesterday 00:00" \) -print

使用命令行 centos系统中 把所有的php文件里的aaa替换为bbb

find . -type f -name "*.php" -exec sed -i 's/aaa/bbb/g' {} +

命令来查看当前目录及其子目录下是否存在 temp.php 文件

find . -name "temp.php"

找到indexback.php 并删除

find . -type f -name "indexback.php" -exec rm -f {} \;

命令导出sql

进入这个目录里/usr/local/mysql/bin执行导出sql命令mysqldump -u root -p mydataname > file.sql
root是用户名mydataname是数据库名
回车-->输入密码-->在这个目录下就有file.sql数据库文件了
/usr/local/mysql/var一般数据库文件在这里
咨询合作电话 / 微信同号,一键拨打

🛠️ 拒绝纸上谈兵,用技术解决实际问题遇到复杂的系统架构或开发难题?博曦云团队精通软件定制、小程序开发与 AI 应用封装,为您提供高性价比的技术落地方案。

上一篇:当机器人连上AI,人类将走向何方?(听风的蚕讲解版)

下一篇:Agent,skill,Harness、Runtime是什么意思,大白话表述