您的位置:首页 > 运维架构 > Linux

find命令、linux与windows文件互传

2019-09-02 23:45 1801 查看

whereis、locate 查找命令

yum install -y mlocate 安装locate命令
updatedb

常用快捷键:
ctrl + d 退出
ctrl + c 取消执行命令
ctrl + u 往前全部删除
ctrl + a 跳到最前面
ctrl + e 跳到最后面

find 命令:
find /etc/ -name
find /etc/ -type d -name
find /etc/ -type f -name

ctime(change 更改文件内容)、atime(access 访问时间)、mtime(改动时间例如文件的权限、大小修改以后)

find /etc/ -type f -mtime +1 查找/etc/目录下一天以前改动的普通文件
find /etc/ -type f -mtime -1 查找/etc/目录下一天内改动的普通文件
find /etc/ -type f -mtime -1 -name .conf 查找/etc/目录下一天以内改动过并且以.conf结尾的普通文件
find /etc/ -type f -o -mtime -1 -o -name .conf 查找/etc/目录下普通文件或者改动时间一天以内普通文件或者名字以.conf结尾的文件
find / -inum 33585698 查找/目录下inode号为33585698的文件



find . -type f -mmin -10 -exec mv {} {}.bak \; 查找当前目录10分钟内更改过的文件并从命名
find ~/ -type f -size -10k -exec ls -lh {} \; 查找~/目录下小于10K的普通文件并用ls列出
find ~/ -type f -size -10M -exec ls -lh {} \; 查找~/目录下小于10M的普通文件并用ls列出

约定俗成的常见文件名后缀
.bz2 使用bzip2命令压缩的文件 bzip2 -d filename解压
.gz 使用gzip命令压缩的文件 gunzip -d filename解压
.tar 使用tar打包的文件 tar xf filename解包
.rpm RedHat的软件包管理器文件
.o 程序对象文件
.so 动态链接库文件

Linux与windows互传文件
在xshell、secureCRT
yum install -y lrzsz
sz filename linux ---> windows
rz windows --> linux

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: