ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
#安装虚拟机工具包,linux高版本都自带 yum install open-vm-tools #创建挂载的共享文件夹 mkdir /mnt/hgfs #手动挂载 vmhgfs-fuse .host:/ /mnt/hgfs mount -t vmhgfs .host:/ /mnt/hgfs #添加自动挂载 vi /etc/fstab #在最后添加一行插入: .host:/ /mnt/hgfs fuse.vmhgfs-fuse allow_other 0 0 批量替换为linux文件格式: sudo find public/components/ -name "*.py" | xargs dos2unix 1 批量替换为dos文件格式: sudo find public/components/ -name "*.py" | xargs unix2dos 1 优点:批量替换,工作量小, 总的来说,方法二借助于 管道符和xargs来实现的批量命令,将方法二修改一下就可以实现很多的批量操作, 比如: 1.批量删除整个linux系统中后缀为.tmp的文件;那么命令可以这么写: sudo find /home/test -name "*.tmp" | xargs rm -f 1 2.删除整个linux系统中与apache相关的文件: sudo find /home/test -name "*apache" | xargs rm -rf --------------------- 本文来自 leedaning 的CSDN 博客 ,全文地址请点击:https://blog.csdn.net/leedaning/article/details/53024290?utm_source=copy