mac小技巧

mac小技巧

隐藏文件夹或者文件

 chflags hidden /Users/usernanme/Downloads/123 
 # chflags hidden 文件路径
 # 恢复隐藏 Shift + Command + .

npm 安装报错

npm WARN deprecated parse-torrent-file@2.1.4: Use the parse-torrent package instead
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR!  { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules']
npm ERR!   stack:
npm ERR!    'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib/node_modules' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).

解决办法:
npm安装权限不足,加sudo。


mac下载磁力链接方法:

t-get 命令行BT下载工具

介绍:

t-get是一个简单的命令行BT下载工具,可以用于BT种子和磁力链接的下,tget 使用 Nodejs 开发,基于 torrent-stream ,代码量很少。

安装:

sudo npm install -g t-get

使用:

磁力链接:tget 'magnet:?xt=urn:btih:0403fb4728bd788fbcb67e87d6feb241ef38c75a'

BT种子:tget ubuntu-16.04.1-desktop-amd64.iso.torrent

文件格式转换 textutil

textutil 是一个系统自带的,用于处理文稿的命令,其中最常用的功能是其下属功能 convert,这句指令允许你将任何文件,在以下文件格式中互相转换 txt, html, rtf, rtfd, doc, docx, wordml, odt, webarchive。

若你手头有一篇 DOCX 文件需要被转换成 TXT,则可以输入 textutil -convert txt 文件路径,这句代码中的 txt 处,可以替换为任何你需要转换到的文件格式,文件路径则可以采用拖拽文件到终端的方法自动填充。

ee2b43c55114de065c1f4ecd47c19f12.gif
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

友情链接更多精彩内容