列出节点模块的简单方法我有npm链接?(Easy way to list node modules I have npm linked?)

编程入门 行业动态 更新时间:2024-10-11 19:22:27
列出节点模块的简单方法我有npm链接?(Easy way to list node modules I have npm linked?)

我正在寻找一个命令,将列出我将npm link到本地副本的全局模块的名称,并列出本地路径。

事实上, 所有全球安装的模块的列表会更好, npm link 'd'以某种方式标记

I am looking for a command that will list the names of global modules that I have npm link'd to local copies, also listing the local path.

In fact, a list of all globally installed modules would be even better, with the npm link'd ones flagged somehow.

最满意答案

您是否尝试仅列出node_modules目录内容(例如ls -l node_modules | grep ^l )? 他们是正常的符号链接。

如果你真的需要找到所有符号链接,你可以尝试像find / -type d -name "node_modules" 2>/dev/null | xargs -I{} find {} -type l -maxdepth 1 | xargs ls -l find / -type d -name "node_modules" 2>/dev/null | xargs -I{} find {} -type l -maxdepth 1 | xargs ls -l find / -type d -name "node_modules" 2>/dev/null | xargs -I{} find {} -type l -maxdepth 1 | xargs ls -l 。

Did you try just listing the node_modules directory contents (e.g. ls -l node_modules | grep ^l)? They're normal symlinks.

If you really need to find all symlinks, you could try something like find / -type d -name "node_modules" 2>/dev/null | xargs -I{} find {} -type l -maxdepth 1 | xargs ls -l.

更多推荐

本文发布于:2023-04-29 01:42:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1334454.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:我有   节点   模块   简单   链接

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!