二十一、find命令
搜索文件命令 which环境变量
whereis locate
find /etc/ -type -d -name "sshd‘
d 目录 f文件 l 软链接 b块设备 s sock文件 c字符串
3个time atime ctime mtime
stat 查看文件3个time
Mtime 创建时间或者更改时间 atime 最近访问时间 ctime 文件大小
你更改了文件的内容ctime一定会变
find / -type f -mtime -1(1天以内+1大于1天)
find / -type f -mtime -1 -name ".conf" 并且
find / -type f -o -mtime -1 -o -name "*.conf" -o或者
找文件硬链接 find / -inum 33583395(inode号)
find /root/ -type f -mmin -60
find /root/ -type f -mmin -60 -exec ls -l {} \;
find /etc/ -type f -mmin -150 -exec mv {} {} \;
find /root/ -type f -size +10k -exec ls -lh {} \;
find /root/ -type f -size +10M -exec ls -lh {} \; 如果要查找M的文件必须大写,小写报错
find常用 -type -mtime -mmin -size -o -exec -name
二十二、文件互传
必须是Xshell或者CRT putty不支持 还需要安装一个包 yum install -y lrzsz
Linux上传到Windows 使用SZ SZ 加文件名
Windows上次到Linux使用RZ 直接回车 文件、目录六
原文:http://blog.51cto.com/13292790/2294161