$ which file
/usr/bin/file
$ file /usr/bin/file
/usr/bin/file: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped
为什么这不起作用?
$ which file | file
Usage: file [-bcikLhnNrsvz0] [-e test] [-f namefile] [-F separator] [-m magicfiles] file...
file -C -m magicfiles
尝试 file --help
获取更多信息。
最佳答案
您可能正在寻找 xargs 或 shell 扩展。尝试:
$ which file | xargs file
或
$ file `which file`
关于linux - 如何将 Linux which 命令的输出通过管道传输到 Linux 文件命令中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5017373/