Linux find
1.find介绍
linux查找命令find是linux运维中很重要、很常用的命令之一,find用于根据指定条件的匹配参数来搜索和查找文件和目录列表,我们可以通过权限、用户、用户组、文件类型、日期、大小等条件来查找文件。
2.find语法
find语法
find [查找路径] [查找条件] [处理动作]
查找路径:指定的具体目标路径
查找条件:指定的查找标准,可以是权限、用户、用户组、文件类型、日期、大小等标准进行
处理动作:对符合条件的文件做相关操作,比如:输出屏幕,存放至某个文件中
3.样例
3.1.根据文件名称,使用find命令进行查找
->在当前工作目录中查找名称为ztj.txt的文件
命令:
find ztj.txt
OR
find . -name ztj.txt -maxdepth 1
[root@rhel77 ~]# find ztj.txt
ztj.txt
[root@rhel77 ~]# find . -name ztj.txt -maxdepth 1
find: warning: you have specified the -maxdepth option after a non-option argument -name, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it). Please specify options before other arguments../ztj.txt
[root@rhel77 ~]#
->在/root目录下,查找名称为ztj.txt的所有文件
命令:
find /root -name ztj.txt
[root@rhel77 ~]# find /root -name ztj.txt
/root/1/ztj.txt
/root/ztj.txt
/root/ztj11/ztj.txt
[root@rhel77 ~]#
->在/root目录中查找名称为z的所有目录
命令:
find /root -type d -name z
[root@rhel77 ~]# find /root -type d -name z
/root/z
[root@rhel77 ~]#
其中,-type类型参数介绍如下:
f:普通文件
l:符号链接
d:目录
c:字符设备
b:块设备
s:套接字
->在/root目录下,查找所有以.zip和.log为扩展名的文件
命令:
find /root -type f \( -name "*.zip" -o -name "*.log" \) -ls
[root@rhel77 ~]# find /root -type f \( -name "*.zip" -o -name "*.log" \) -ls
1731369 80 -rw-r--r-- 1 root root 81141 May 4 16:13 /root/wordpress_auto_install.log
1731610 4 -rw-r--r-- 1 root root 2059 Jul 28 15:14 /root/ztj.zip
3269480 4 -rw-r--r-- 1 root root 586 May 17 22:19 /root/disk.log
3257826 40 -rw-r--r-- 1 root root 40739 May 25 14:01 /root/extundelete-0.2.4/config.log
1731382 4 -rw-r--r-- 1 root root 642 Jul 21 14:04 /root/1.zip
1731605 4 -rw-r--r-- 1 root root 106 Aug 10 09:10 /root/urandom.log
1731400 4 -rw-r--r-- 1 root root 1475 Jul 21 14:08 /root/2.zip70 4 -rw-r--r-- 1 root root 3334 Jul 20 08:50 /root/z.zip
3256369 4 -rw-r--r-- 1 root root 48 May 19 09:07 /root/zt1.log
[root@rhel77 ~]#
->在/root目录下,查找所有以.png,.jpg,.php和.js为扩展名的文件
命令:
find /root -type f \( -name "*.png" -o -name "*.jpg" -o -name "*.php" -o -name "*.js" \) -ls
[root@rhel77 ~]# find /root -type f \( -name "*.png" -o -name "*.jpg" -o -name "*.php" -o -name "*.js" \) -ls
3247961 0 -rw-r--r-- 1 root root 0 Aug 17 14:25 /root/1.png
3247965 0 -rw-r--r-- 1 root root 0 Aug 17 14:25 /root/2.jpg
3247966 0 -rw-r--r-- 1 root root 0 Aug 17 14:25 /root/3.php
3247967 0 -rw-r--r-- 1 root root 0 Aug 17 14:25 /root/4.js
[root@rhel77 ~]#
3.2.根据文件权限,使用find命令进行查找
->在/root目录下,查找权限为777的文件
命令:
find /root -type f -perm 0777 -maxdepth 1 -ls
[root@rhel77 ~]# find /root -type f -perm 0777 -maxdepth 1 -ls
find: warning: you have specified the -maxdepth option after a non-option argument -type, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it). Please specify options before other arguments.1731602 160 -rwxrwxrwx 1 root root 160059 Aug 16 09:56 /root/abc.txt
3256377 4 -rwxrwxrwx 1 root root 259 May 23 16:48 /root/user_info.txt
[root@rhel77 ~]#
->在/root目录下,查找权限不是777的文件
命令:
find /root -type f ! -perm 777 -maxdepth 1 -ls
[root@rhel77 ~]# find /root -type f ! -perm 777 -maxdepth 1 -ls | tail -n 5
find: warning: you have specified the -maxdepth option after a non-option argument -type, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it). Please specify options before other arguments.3256384 4 -rwxr-xr-x 1 root root 988 May 23 22:33 /root/fdisk.sh
3257852 4 -rw-r--r-- 1 root root 62 May 27 14:42 /root/1234.txt
430437 4 -rwxr-xr-x 1 root root 64 Jun 5 21:23 /root/ztj-1.sh
1731615 4 -rwxr-xr-x 1 root root 21 Jun 7 13:55 /root/uuidgen.sh
430376 4 -rw-r--r-- 1 root root 41 Jul 21 13:59 /root/zzz.txt.bz2
[root@rhel77 ~]#
->在/root目录下,查找权限为777的目录,将其权限设置为755
命令:
find /root -type d -perm 777 -maxdepth 1 -ls -exec chmod 755 {} \;
[root@rhel77 ~]# find /root -type d -perm 777 -maxdepth 1 -ls -exec chmod 755 {} \;
find: warning: you have specified the -maxdepth option after a non-option argument -type, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it). Please specify options before other arguments.69 12 drwxrwxrwx 24 root root 8192 Aug 16 09:27 /root
1729025 0 drwxrwxrwx 2 root root 90 Jul 20 10:29 /root/test
->在/root目录下,查找名称为cc.txt文件,并将其删除
命令:
find /root -type f -name cc.txt -maxdepth 1 | xargs rm -rf
[root@rhel77 ~]# find /root -type f -name cc.txt -maxdepth 1 | xargs rm -rf
find: warning: you have specified the -maxdepth option after a non-option argument -type, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it). Please specify options before other arguments.[root@rhel77 ~]#
OR
find /root -type f -name cc.txt -maxdepth 1 -exec rm -rf {} \;
[root@rhel77 ~]# find /root -type f -name cc.txt -maxdepth 1 -exec rm -rf {} \;
find: warning: you have specified the -maxdepth option after a non-option argument -type, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it). Please specify options before other arguments.[root@rhel77 ~]#
->在/root目录下,找出权限是600的文件
命令:
find /root/ -perm 600 -ls
[root@rhel77 ~]# find /root/ -perm 600 -ls
3698739 4 -rw------- 1 root root 1679 Apr 27 14:09 /root/.ssh/id_rsa1601 16 -rw------- 1 root root 14605 Aug 17 10:03 /root/.bash_history
3247958 8 -rw------- 1 root root 5648 Aug 17 10:03 /root/.viminfo
1731372 0 -rw------- 1 alice alice 0 May 27 21:04 /root/test/alice.txt
202108776 4 -rw------- 1 root root 11 Aug 17 13:32 /root/.cache/abrt/lastnotification
542180 4 -rw------- 1 root root 312 Aug 10 08:51 /root/.lesshst
3247962 4 -rw------- 1 root root 312 Aug 17 13:32 /root/.Xauthority
1731398 4 -rw------- 1 root root 306 Aug 10 09:08 /root/nohup.out
3256372 4 -rw------- 1 root root 15 Jul 17 08:35 /root/.lvm_history
3547010 4 -rw------- 1 root root 18 Jun 4 12:00 /root/.mysql_history
[root@rhel77 ~]#
上述命令(find /root/ -perm 600 -ls)会找到所有只有rw-------权限的文件。
另外,
如下命令:
find /root/ -perm -600 -ls
-600表示列出只要是包括了rw的其它位任意的文件
[root@rhel77 ~]# find /root/ -perm -600 -ls |head -n 1069 16 drwxr-xr-x 24 root root 12288 Aug 17 13:32 /root/
3180996 4 -rwxr-xr-x 1 root root 79 Apr 11 09:55 /root/access.sh
135138217 0 drwxr-xr-x 2 root root 6 Apr 24 19:08 /root/110
502725 4 -rw-r--r-- 1 root root 18 Dec 29 2013 /root/.bash_logout
542640 4 -rwxr-xr-x 1 root root 192 Mar 15 09:25 /root/earth-1.sh
1729048 4 -rw-r--r-- 1 root root 57 Mar 16 15:57 /root/symlinks-1.list
542203 4 -rwxr-xr-x 1 root root 94 Mar 30 13:57 /root/apache-1.sh
3193035 4 -rwxr-xr-x 1 root root 207 Apr 18 22:22 /root/spawn.sh
502727 4 -rw-r--r-- 1 root root 176 Dec 29 2013 /root/.bashrc
3181007 4 -rwxr-xr-x 1 root root 155 Apr 11 14:05 /root/case-2.sh
[root@rhel77 ~]#
如下命令:
find /root/ -perm /600 -ls
/600表示列出指定的权限符合r--------或w--------的文件。
[root@rhel77 ~]# find /root/ -perm /600 -ls |head -n 1069 16 drwxr-xr-x 24 root root 12288 Aug 17 13:32 /root/
3180996 4 -rwxr-xr-x 1 root root 79 Apr 11 09:55 /root/access.sh
135138217 0 drwxr-xr-x 2 root root 6 Apr 24 19:08 /root/110
502725 4 -rw-r--r-- 1 root root 18 Dec 29 2013 /root/.bash_logout
542640 4 -rwxr-xr-x 1 root root 192 Mar 15 09:25 /root/earth-1.sh
1729048 4 -rw-r--r-- 1 root root 57 Mar 16 15:57 /root/symlinks-1.list
542203 4 -rwxr-xr-x 1 root root 94 Mar 30 13:57 /root/apache-1.sh
3193035 4 -rwxr-xr-x 1 root root 207 Apr 18 22:22 /root/spawn.sh
502727 4 -rw-r--r-- 1 root root 176 Dec 29 2013 /root/.bashrc
3181007 4 -rwxr-xr-x 1 root root 155 Apr 11 14:05 /root/case-2.sh
[root@rhel77 ~]#
3.3.基于文件所有者和所属组,使用find命令进行查找
->在/root目录下,找出文件所有者为root,名称为ztj.txt的文件
命令:
find /root/ -user root -name ztj.txt -ls
[root@rhel77 ~]# find /root/ -user root -name ztj.txt -ls
68916551 4 -rw-r--r-- 1 root root 28 Mar 30 16:54 /root/1/ztj.txt
3247948 0 -rw-r--r-- 1 root root 0 Aug 4 10:00 /root/ztj.txt
203522440 4 -rw-r--r-- 1 root root 4 Apr 23 2022 /root/ztj11/ztj.txt
[root@rhel77 ~]#
->在/root目录下,找出文件属组为root,文件名称为process.txt的文件
命令:
find /root/ -group root -name process.txt -ls
[root@rhel77 ~]# find /root/ -group root -name process.txt -ls
1731367 48 -rw-r--r-- 1 root root 48638 May 16 16:43 /root/process.txt
[root@rhel77 ~]#
->在/root目录,查找所有者为root的所有.txt文件
命令:
find /root -user root -iname "*.txt" -ls
其中,
-iname:忽略name的大小写版本
[root@rhel77 ~]# find /root -user root -iname "*.txt" -ls
1731370 4 -rw-r--r-- 3 root root 8 May 27 21:29 /root/test/a.txt
1731370 4 -rw-r--r-- 3 root root 8 May 27 21:29 /root/test/b.txt
1731370 4 -rw-r--r-- 3 root root 8 May 27 21:29 /root/test/d.txt
3181009 4 -rw-r--r-- 1 root root 14 Mar 23 15:18 /root/all.txt
3193028 4 -rw-r--r-- 1 root root 604 Apr 18 13:36 /root/system.txt
542186 4 -rw-r--r-- 1 root root 6 Mar 1 14:33 /root/bb.txt
1555878 4 -rw-r--r-- 1 root root 9 Jun 5 21:41 /root/user.txt
3193757 4 -rw-r--r-- 1 root root 154 Apr 26 08:56 /root/test.txt
137253126 4 -rw-r--r-- 1 root root 37 Aug 4 09:57 /root/123/zzz.txt
137119752 4 -rw-r--r-- 1 root root 6 Mar 15 10:12 /root/2/bb.txt
430370 4 -rw-r--r-- 1 root root 37 Aug 4 09:55 /root/zzz.txt
137259616 4 -rw-r--r-- 1 root root 3 May 27 17:05 /root/z/aa.txt
68916537 4 -rw-r--r-- 1 root root 2 Mar 30 16:54 /root/1/aa.txt
68916539 4 -rw-r--r-- 1 root root 14 Mar 30 16:54 /root/1/all.txt
68916543 4 -rw-r--r-- 1 root root 6 Mar 30 16:54 /root/1/bb.txt
68916545 4 -rw-r--r-- 1 root root 464 Mar 30 16:54 /root/1/cc.txt
68916547 4 -rw-r--r-- 1 root root 6 Mar 30 16:54 /root/1/user.txt
68916551 4 -rw-r--r-- 1 root root 28 Mar 30 16:54 /root/1/ztj.txt
3698754 4 -r--r--r-- 1 root root 10 Apr 28 08:58 /root/gg.txt
1731602 180 -rwxrwxrwx 1 root root 183335 Aug 17 13:54 /root/abc.txt
1731374 4 -rw-r--r-- 1 root root 58 May 13 20:12 /root/online.txt
1731378 4 -rw-r--r-- 1 root root 1636 May 13 20:12 /root/offline.txt
3269441 4 -rw-r--r-- 1 root root 132 May 9 22:15 /root/off.txt
3269442 4 -rw-r--r-- 1 root root 1 May 9 22:15 /root/on.txt
3269445 4 -rw-r--r-- 1 root root 1794 May 19 09:18 /root/a.txt
1731367 48 -rw-r--r-- 1 root root 48638 May 16 16:43 /root/process.txt
3247948 0 -rw-r--r-- 1 root root 0 Aug 4 10:00 /root/ztj.txt
1731387 4 -rw-r--r-- 1 root root 361 May 29 19:53 /root/1.txt
3193031 4 -rw-r--r-- 1 root root 56 Apr 20 10:52 /root/v.txt
1731403 512000 -rw-r--r-- 1 root root 524288000 May 31 08:42 /root/boc.txt
1729071 0 -rw-r--r-- 1 root root 0 Jul 20 08:33 /root/DDA/ztj/1.txt
1731379 0 -rw-r--r-- 1 root root 0 Jul 20 08:34 /root/DDA/ztj/2.txt
1731391 0 -rw-r--r-- 1 root root 0 Jul 20 08:34 /root/DDA/ztj/3.txt
1731394 0 -rw-r--r-- 1 root root 0 Jul 20 08:34 /root/DDA/ztj/4.txt
1731404 0 -rw-r--r-- 1 root root 0 Jul 20 08:34 /root/DDA/ztj/5.txt
1731406 0 -rw-r--r-- 1 root root 0 Jul 20 08:34 /root/DDA/ztj/6.txt
3698742 4 -rw-r--r-- 1 root root 102 Apr 23 21:12 /root/brace.txt
3247960 0 -rw-r--r-- 1 root root 0 Aug 17 13:53 /root/tttt.TXT
203522440 4 -rw-r--r-- 1 root root 4 Apr 23 2022 /root/ztj11/ztj.txt
203522446 0 lrwxrwxrwx 1 root root 7 Apr 23 2022 /root/ztj11/aa.txt -> ztj.txt
3256377 4 -rwxrwxrwx 1 root root 259 May 23 16:48 /root/user_info.txt
430371 4 -rw-r--r-- 1 root root 2137 Aug 4 09:55 /root/zzza.txt
3698759 0 lrwxrwxrwx 1 root root 7 Apr 28 09:06 /root/hh.txt -> ztj.txt
430369 4 -rw-r--r-- 1 root root 23 Jul 19 08:38 /root/ztj1.txt
3269443 4 -rw-r--r-- 1 root root 52 May 19 09:18 /root/b.txt
1731368 4 -rw-r--r-- 1 root root 892 May 16 16:56 /root/stat.txt
3256365 4 -rw-r--r-- 1 root root 6 May 18 21:01 /root/22.txt
3257852 4 -rw-r--r-- 1 root root 62 May 27 14:42 /root/1234.txt
[root@rhel77 ~]#
3.4.根据文件日期和时间,使用find命令进行查找
linux系统里面的文件都有三种属性:
访问(access)时间(-atime/天,-amin/分钟):用户最近一次访问时间
修改(modify)时间(-mtime/天,-mmin/分钟):文件最后一次修改时间
变化(change)时间(-ctime/天,-cmin/分钟):文件元数据(例如权限、属性等)最后一次修改时间
->在/root目录下,查找50天外修改的所有文件
命令:
find /root -mtime +50 -ls
[root@rhel77 ~]# find /root -mtime +50 -ls |head -n 10
3180996 4 -rwxr-xr-x 1 root root 79 Apr 11 09:55 /root/access.sh
135138217 0 drwxr-xr-x 2 root root 6 Apr 24 19:08 /root/110
502725 4 -rw-r--r-- 1 root root 18 Dec 29 2013 /root/.bash_logout
542640 4 -rwxr-xr-x 1 root root 192 Mar 15 09:25 /root/earth-1.sh
1729048 4 -rw-r--r-- 1 root root 57 Mar 16 15:57 /root/symlinks-1.list
542203 4 -rwxr-xr-x 1 root root 94 Mar 30 13:57 /root/apache-1.sh
3193035 4 -rwxr-xr-x 1 root root 207 Apr 18 22:22 /root/spawn.sh
502727 4 -rw-r--r-- 1 root root 176 Dec 29 2013 /root/.bashrc
3181007 4 -rwxr-xr-x 1 root root 155 Apr 11 14:05 /root/case-2.sh
502728 4 -rw-r--r-- 1 root root 100 Dec 29 2013 /root/.cshrc
[root@rhel77 ~]#
->在/root目录下,查找最近1小时内修改的所有文件
命令:
find /root -mmin -60 -ls
[root@rhel77 ~]# find /root -mmin -60 -ls69 16 drwxr-xr-x 24 root root 12288 Aug 17 13:53 /root
201482216 0 drwxr-xr-x 2 root root 30 Aug 17 13:32 /root/.cache/abrt
202108776 4 -rw------- 1 root root 11 Aug 17 13:32 /root/.cache/abrt/lastnotification
3247962 4 -rw------- 1 root root 312 Aug 17 13:32 /root/.Xauthority
1731602 180 -rwxrwxrwx 1 root root 184083 Aug 17 14:11 /root/abc.txt
3247960 0 -rw-r--r-- 1 root root 0 Aug 17 13:53 /root/tttt.TXT
[root@rhel77 ~]#
3.5.根据文件大小,使用find命令进行查找
->在/root目录下,找到大小为15MB的文件
命令:
find /root -size 15M -ls
[root@rhel77 ~]# find /root -size 15M -ls
3268520 14924 -rw-r--r-- 1 root root 15279408 Jun 3 20:18 /root/mysql-community-server-minimal-5.7.42-1.el7.x86_64.rpm
[root@rhel77 ~]#
->在/root目录下,找到大于1MB且小于16MB的所有文件
命令:
find /root -size +1M -size -16M -ls
[root@rhel77 ~]# find /root -size +1M -size -16M -ls
3268520 14924 -rw-r--r-- 1 root root 15279408 Jun 3 20:18 /root/mysql-community-server-minimal-5.7.42-1.el7.x86_64.rpm
3698723 8872 -rw-r--r-- 1 root root 9082696 Apr 30 07:09 /root/wordpress-4.9.4-zh_CN.tar.gz
69023364 1860 -rw-r--r-- 1 root root 1904320 May 25 14:01 /root/extundelete-0.2.4/src/extundelete-extundelete.o
69023371 1296 -rwxr-xr-x 1 root root 1323312 May 25 14:01 /root/extundelete-0.2.4/src/extundelete
1731386 10224 -rw-r--r-- 1 root root 10466248 May 29 13:50 /root/aa.tar.gz
[root@rhel77 ~]#
3.6.基于inode删除ztj.txt文件(使用频率居高)
命令:
ls -li ztj.txt
find /root -inum 3247948 -exec rm -rf {} \;
[root@rhel77 ~]# pwd
/root
[root@rhel77 ~]# ls -li ztj.txt
3247948 -rw-r--r-- 1 root root 0 Aug 4 10:00 ztj.txt
[root@rhel77 ~]# find /root -inum 3247948 -ls
3247948 0 -rw-r--r-- 1 root root 0 Aug 4 10:00 /root/ztj.txt
[root@rhel77 ~]# find /root -inum 3247948 -exec rm -rf {} \;
[root@rhel77 ~]# ls -li ztj.txt
ls: cannot access ztj.txt: No such file or directory
[root@rhel77 ~]#
相关文章:
Linux find
1.find介绍 linux查找命令find是linux运维中很重要、很常用的命令之一,find用于根据指定条件的匹配参数来搜索和查找文件和目录列表,我们可以通过权限、用户、用户组、文件类型、日期、大小等条件来查找文件。 2.find语法 find语法 find [查找路径] …...
UE4实现断线重连功能
断线重连的整体逻辑是 设备离线后,根据需要决定是否保留pawn,还是设备重连后再重新生成一个,然后是断线重连时的验证方式,最后是playerstate重连后的属性保留 重载Playercontroller的PawnLeavingGame,这里是设备断线后࿰…...

nginx笔记
1. nginx 简介 nginx性能比apache强,体现 在io模型方面 76 Pv: UV : 不同浏览器是不同的UV GET 获取 POST 上传 HEAT 只看头 访问网站的流程 1.dns解析 2.cdn 3.tcp 4.web服务器 处理 建立连接 接收请求 处理请求 GET POST等 获取资源 构…...

动态库的制作和使用
动态库和静态库的工作原理 配置环境变量 方式1: 坏处:环境变量是临时的 方式2: 1 用户级别的配置: 进入到/home,找到.bashrc,进入 先去找到库的路径 然后再到.bashrc最后一行输入路径 使其生效 2 系统…...
AWS Glue Pyspark+Athena基础学习汇总
Pyspark 基础学习汇总篇🍎 一、AWS 架构 ① AWS Glue:工作平台,包括脚本的编写以及管理脚本的运行状态以及调度等(主要:数据库配置、ETL和数据转换脚本编写、调度) ② Amazon S3 数据湖(数仓):数据的存储 ③ Athena:(雅典娜)SQL直接编写查询工作台(会产生费用) ④ Q…...
智能合约安全新范式,超越 `require`和`assert`
智能合约安全新范式,超越 require_assert 摘要 不要只为特定的函数写 require 语句;为你的协议写 require 语句。函数遵循检查(requirements)-生效(Effects)-交互(INteractions)协议不变性(Invariants)或 FREI-PI 模式可以帮助你的合约更加安全&#x…...

【ESP-S3-BOX-Lite花屏问题】:Github下载源码(出厂源码factory_demo)编译调试到ESP-S3-BOX-Lite中出现花屏现象
项目场景: 最近拿到了一块乐鑫的 ESP-S3-BOX-Lite (esp-box: ESP-BOX 是乐鑫信息科技) 详细资料(esp32_s3_box_lite) 版本信息 ESP-BOX依赖的 ESP-IDF分支信息支持状态master> release/v5.1 commit id: 22cfbf3…...

Redis集群3.2.11离线安装详细版本(使用Ruby)
1.安装软件准备 1.Redis版本下载 Index of /releases/http://download.redis.io/releases/ 1.2gcc环境准备 GCC(GNU Compiler Collection,GNU编译器套件)是一套用于编译程序代码的开源编译器工具集。它的主要用途是将高级编程语言(如C、C++、Fortran等)编写的源代码转换…...

Ansible自动化运维
目录 前言 一、概述 常见的开源自动化运维工具比较 二、ansible环境搭建 三、ansible模块 (一)、hostname模块 (二)、file模块 (三)、copy模块 (四)、fetch模块 ÿ…...

MSTP + Eth-Trunk配置实验 华为实验手册
1.1 实验介绍 1.1.1 关于本实验 以太网是当今现有局域网LAN(Local Area Network)采用的最通用的通信协议标准,以太网作为一种原理简单、便于实现同时又价格低廉的局域网技术已经成为业界的主流。 本实验主要介绍了LAN网络中的Eth-Trunk技术…...

滚动菜单 flutter
想实现这个功能: 下面的代码可以实现: import package:flutter/material.dart;void main() > runApp(MyApp());class MyApp extends StatelessWidget {static const String _title Flutter Code Sample;overrideWidget build(BuildContext context)…...
javaee springMVC数字类型转换之通过注解的方式
po 在属性上增加注解 NumberFormat(pattern “#,#.#”) package com.test.pojo;import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.NumberFormat;import java.util.Date;public class Users {private int uid;pr…...
SQL中CASE的用法
在SQL中,CASE语句是一种条件表达式,用于根据条件执行不同的操作。它有两种形式:简单CASE表达式和搜索CASE表达式。 简单CASE表达式的语法如下: CASE expressionWHEN value1 THEN result1WHEN value2 THEN result2...ELSE result …...

自己的碎碎念集合
自己的碎碎念集合 2023-09-07 c++叠加三目运算符闰年计算法2023-08-13 一个小题目 A+B problem一、问题及解答关碍总结2023-07-26 C的2至36进制转换函数一、itoa()函数的示例代码总结2023-07-19 平面坐标下判断三角形以及输出周长和面积一. 基本知识总结2023-06-25 达芬奇去除白…...
暂定名「码道功成:Coder启示录」
听人劝、吃饱饭,奉劝各位小伙伴,不要订阅该文所属专栏。 作者:不渴望力量的哈士奇(哈哥),十余年工作经验, 跨域学习者,从事过全栈研发、产品经理等工作,现任研发部门 CTO 。荣誉:2022年度博客之星Top4、博客专家认证、全栈领域优质创作者、新星计划导师,“星荐官共赢计…...

Apache HTTPD (CVE-2017-15715)换行解析漏洞复现
Apache HTTPD 换行解析漏洞 CVE-2017-15715漏洞简介 组件版本漏洞名称 Apache HTTPD 换行解析漏洞(CVE-2017-15715) 漏洞描述 Apache HTTPD是一款HTTP服务器,它可以通过mod_php来运行PHP网页。其2.4.0~2.4.29版本中存在一个解析漏洞&…...

Spring Boot集成JasperReport生成文档
由于工作需要,要实现后端根据模板动态填充数据生成PDF文档,通过技术选型,使用Ireport5.6来设计模板,结合JasperReports5.6工具库来调用渲染生成PDF文档。 一、使用Ireport designer 5.6设计模板 ireport的使用由于时间关系不便多…...

02-Tomcat打破双亲委派机制
上一篇:01-从JDK源码级别剖析JVM类加载机制 Tomcat 如果使用默认的双亲委派类加载机制行不行? 我们思考一下:Tomcat是个web容器, 那么它要解决什么问题: 一个web容器可能需要部署两个应用程序,不同的应用…...
怎么理解flink的异步检查点机制
背景 flink的checkpoint监控页面那里有两个指标Sync Duration 和Async Duration,一个是开始进行同步checkpoint所需的时间,一个是异步checkpoint过程所需的时间,你是否也有过疑惑,是否只是同步过程中的时间才会阻塞正常的数据处理…...

SpringMVC <url-pattern/>解读
1. < url-pattern/>的值 (1).使用拓展名的方式,语法*.xxx,xxx是自定义的拓展名,常用的方式*.do,*.action,不能使用*.jsp. (2).使用斜杠 "/"当项目中使用了 / ,他会替代tomcat中的default。导致所有的…...
应用升级/灾备测试时使用guarantee 闪回点迅速回退
1.场景 应用要升级,当升级失败时,数据库回退到升级前. 要测试系统,测试完成后,数据库要回退到测试前。 相对于RMAN恢复需要很长时间, 数据库闪回只需要几分钟。 2.技术实现 数据库设置 2个db_recovery参数 创建guarantee闪回点,不需要开启数据库闪回。…...
在鸿蒙HarmonyOS 5中实现抖音风格的点赞功能
下面我将详细介绍如何使用HarmonyOS SDK在HarmonyOS 5中实现类似抖音的点赞功能,包括动画效果、数据同步和交互优化。 1. 基础点赞功能实现 1.1 创建数据模型 // VideoModel.ets export class VideoModel {id: string "";title: string ""…...

大数据零基础学习day1之环境准备和大数据初步理解
学习大数据会使用到多台Linux服务器。 一、环境准备 1、VMware 基于VMware构建Linux虚拟机 是大数据从业者或者IT从业者的必备技能之一也是成本低廉的方案 所以VMware虚拟机方案是必须要学习的。 (1)设置网关 打开VMware虚拟机,点击编辑…...

定时器任务——若依源码分析
分析util包下面的工具类schedule utils: ScheduleUtils 是若依中用于与 Quartz 框架交互的工具类,封装了定时任务的 创建、更新、暂停、删除等核心逻辑。 createScheduleJob createScheduleJob 用于将任务注册到 Quartz,先构建任务的 JobD…...
使用van-uploader 的UI组件,结合vue2如何实现图片上传组件的封装
以下是基于 vant-ui(适配 Vue2 版本 )实现截图中照片上传预览、删除功能,并封装成可复用组件的完整代码,包含样式和逻辑实现,可直接在 Vue2 项目中使用: 1. 封装的图片上传组件 ImageUploader.vue <te…...
重启Eureka集群中的节点,对已经注册的服务有什么影响
先看答案,如果正确地操作,重启Eureka集群中的节点,对已经注册的服务影响非常小,甚至可以做到无感知。 但如果操作不当,可能会引发短暂的服务发现问题。 下面我们从Eureka的核心工作原理来详细分析这个问题。 Eureka的…...

HarmonyOS运动开发:如何用mpchart绘制运动配速图表
##鸿蒙核心技术##运动开发##Sensor Service Kit(传感器服务)# 前言 在运动类应用中,运动数据的可视化是提升用户体验的重要环节。通过直观的图表展示运动过程中的关键数据,如配速、距离、卡路里消耗等,用户可以更清晰…...
如何配置一个sql server使得其它用户可以通过excel odbc获取数据
要让其他用户通过 Excel 使用 ODBC 连接到 SQL Server 获取数据,你需要完成以下配置步骤: ✅ 一、在 SQL Server 端配置(服务器设置) 1. 启用 TCP/IP 协议 打开 “SQL Server 配置管理器”。导航到:SQL Server 网络配…...

向量几何的二元性:叉乘模长与内积投影的深层联系
在数学与物理的空间世界中,向量运算构成了理解几何结构的基石。叉乘(外积)与点积(内积)作为向量代数的两大支柱,表面上呈现出截然不同的几何意义与代数形式,却在深层次上揭示了向量间相互作用的…...

云原生时代的系统设计:架构转型的战略支点
📝个人主页🌹:一ge科研小菜鸡-CSDN博客 🌹🌹期待您的关注 🌹🌹 一、云原生的崛起:技术趋势与现实需求的交汇 随着企业业务的互联网化、全球化、智能化持续加深,传统的 I…...