在 linux 命令行上运行脚本后,我得到一个 .txt 文件。查看 .txt 文件时,我看到很多数字以及在哪些文件目录中可以找到它们。
例如:
usr/lib/tc/pareto.dist
123455324
usr/bin/python2.7
4564745
/etc/rpc
845669
我知道我可以使用 ls -l "some_file
显示一个文件目录的权限。
但是如何在一个txt.file中显示多个文件目录的权限呢?
例如:
-rw-rw-r-- 1 me me 1097374 Sep 26 18:48 some_file
-rwxr-xr-x 1 root root 316848 Feb 27 2000 /usr/bin
..
最佳答案
这可以帮助你。
grep "/" yourFile | xargs ls -l
或
ls -l `grep "/" yourFile`
关于linux - 如何检查多个文件目录的权限 - linux,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39918408/