(1)创建名为/usr/local/bin/file.sh的脚本,
(2)查找 /usr 下面所有小于10M 并有设置sgid权限的文件
(3)将查找到的文件列表保存到 /root/myfile 中
[root@servera ~]# vim /usr/local/bin/file.sh
#!/bin/bash
find /usr -size -10M -perm -2000 > /root/myfile
[root@servera ~]# chmod a+x /usr/local/bin/file.sh
[root@servera ~]# file.sh
[root@servera ~]# cat /root/myfile
/usr/bin/write
/usr/bin/locate
/usr/libexec/utempter/utempter
/usr/libexec/openssh/ssh-keysign