ByteNote LogoByteNote

Navigation

  • Blog
  • 工具

    © 2025 ByteNote. All rights reserved.

    将 lsof -i -P -n | grep LISTEN | grep 缩短成一个 bash alias 可以传参数

    Mar 13, 20232 min read

    可以在 ~/.bashrc 文件中加入如下代码:

    alias lis='lsof -i -P -n | grep LISTEN | grep '
    

    然后使用 lis 命令即可,例如:

    lis 8080
    

    就相当于执行:

    lsof -i -P -n | grep LISTEN | grep 8080
    

    相关文章

    JavaScript函数调用的方式有哪些?

    JavaScript中函数的调用方式包括函数调用语句、方法调用语句、构造函数调用语句、apply()方法调用语句和call()方法调用语句,其中apply()和call()方法可以指定函数内部this的指向。

    JavaScript中Symbol类型的强制类型转换规则是什么?

    Symbol类型在JavaScript中只能强制转换为字符串,转换为布尔值始终为true,但不能转换为数字,否则会引发TypeError。

    another app is currently holding the yum lock;waiting for it to exit

    An app is holding the yum lock, and the solution is to remove the yum.pid file to release the lock.

    pnpm 更改官方npm 源

    要更改官方npm源为pnpm源,需先全局安装pnpm,然后设置其注册表为npm官方源,并通过命令验证更改。

    Flutter SearchDelegate 的使用案例

    该代码示例展示了如何在Flutter应用中使用`SearchDelegate`实现搜索功能,包括搜索栏的构建、结果展示和建议列表的生成。