我的服务器已更改,也是我的服务器IP。
现在我必须检查旧IP的所有文件以替换为新的IP。
首先我要搜索所有包含“old.IP”的文件。 这是管道到一个特殊的文件,如“oldIPFiles” 我试试这个:
find . -type f -print | xargs grep "old.IP" >>/root/oldIPFiles.txt
但它起作用了。
我只尝试:
find . -type f -print | xargs grep "old.IP"
但我得到了很多:
grep: ./sys/fs/ext4/sda3/trigger_fs_error: Permission denied
grep: ./sys/fs/cgroup/blkio/blkio.reset_stats: Invalid argument
grep: ./sys/fs/cgroup/devices/devices.allow: Invalid argument
grep: ./sys/fs/cgroup/devices/devices.deny: Invalid argument
grep: ./sys/fs/cgroup/systemd/system.slice/dev-disk-byx2did-scsix2d0QEMU_QEMU_HARDDISK_drivex2dscsi0x2d0x2d0x2d0x2dpart2.swap/tasks: No such file or directory
grep: ./sys/fs/cgroup/systemd/system.slice/dev-disk-byx2did-scsix2d0QEMU_QEMU_HARDDISK_drivex2dscsi0x2d0x2d0x2d0x2dpart2.swap/cgroup.procs: No such file or directory
grep: ./sys/fs/cgroup/systemd/system.slice/dev-disk-byx2did-scsix2d0QEMU_QEMU_HARDDISK_drivex2dscsi0x2d0x2d0x2d0x2dpart2.swap/cgroup.clone_children: No such file or directory
grep: ./sys/fs/cgroup/systemd/system.slice/dev-disk-byx2did-scsix2d0QEMU_QEMU_HARDDISK_drivex2dscsi0x2d0x2d0x2d0x2dpart2.swap/notify_on_release: No such file or directory
grep: ./sys/fs/cgroup/systemd/system.slice/dev-disk-byx2dpartuuid-d7dfbdc0x2d9f26x2d47f3x2da9fcx2d42ae5ef6c5be.swap/tasks: No such file or directory
grep: ./sys/fs/cgroup/systemd/system.slice/dev-disk-byx2dpartuuid-d7dfbdc0x2d9f26x2d47f3x2da9fcx2d42ae5ef6c5be.swap/cgroup.procs: No such file or directory
有人可以帮我吗?