0

一直在为 Ubuntu 开发一些自定义 ISO,所以我有很多不同的挂载等。我想扫描所有内容以找到所有 initrd.img* 文件,但我在 find 命令中得到了“功能”的计时. 定位命令不起作用,因为没有安装这个东西。

developer@developer-u32-dev-VM:/$ sudo find -iname *initrd.img*
find: paths must precede expression: initrd.img.old
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
developer@developer-u32-dev-VM:/$ sudo find -iname *initrd.img-*
./boot/initrd.img-3.19.0-25-generic
./boot/initrd.img-3.19.0-15-generic
./boot/initrd.img-3.19.0-23-generic

如您所见,我可以使用 find 来识别物理文件,但我需要找到所有 initrd.img 链接。

怎么办?

4

2 回答 2

0

引用你的模式。外壳正在globbing它。改变

sudo find -iname *initrd.img*

sudo find -iname "*initrd.img*"
于 2015-08-06T23:50:12.740 回答
0

查找所有指向initrd.img的符号链接

$ find -lname \*initrd.img*
于 2015-08-07T07:04:28.747 回答