mac重复关联菜单去除

       /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -help

lsregister: [OPTIONS] [ <path>... ]

                      [ -apps <domain>[,domain]... ]
                      [ -libs <domain>[,domain]... ]
                      [ -all  <domain>[,domain]... ]


Paths are searched for applications to register with the Launch Service database.
Valid domains are "system", "local", "network" and "user". Domains can also
be specified using only the first letter.


  -kill     Reset the Launch Services database before doing anything else
  -seed     If database isn't seeded, scan default locations for applications and libraries to register
  -lint     Print information about plist errors while registering bundles
  -convert  Register apps found in older LS database files
  -lazy n   Sleep for n seconds before registering/scanning
  -r        Recursive directory scan, do not recurse into packages or invisible directories
  -R        Recursive directory scan, descending into packages and invisible directories
  -f        force-update registration even if mod date is unchanged
  -u        unregister instead of register
  -v        Display progress information
  -dump     Display full database contents after registration
  -h        Display this help 

      如果需要清理菜单重复项和无效的关联,可以在终端运行下面命令,在本地、系统和用户空间上,重建LS数据库:
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user

lsregister 命令参数如下:
-kill:重置全局LS数据库(最先执行)
-lint:打印详细应用程序文件关联注册中的错误信息
-convert:将老数据库中的信息注册到新的LS数据库
-load:加载LS插件
-lazy n:指定一个注册等待时间
-r:递归的查找文件夹内容以做关联之用(不包括pkg类型文件和隐藏文件夹下的内容)
-R:递归的查找文件夹内容以做关联之用(包括pkg类型文件和隐藏文件夹下的内容)
-f:强制更新所有对应注册信息
-v:输出lsregister运行详细信息
-dump:在注册完成后显示数据库内容
-h:显示此帮助

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值