简体   繁体   English

你如何逃脱*杜?

[英]How do you escape * for du?

The ruby library I'm using, Rye , adds quotes around the search string. 我正在使用的ruby库Rye在搜索字符串周围添加了引号。 So instead of du -sh * the query becomes du -sh '*' 因此查询不是du -sh * ,而是du -sh '*'

How can I escape the asterisk? 如何摆脱星号? du -sh '\\\\*' does not work du -sh '\\\\*'不起作用

i think it should be possible by doing this 我认为这样做应该有可能

rbox = Rye::Box.new [...]
rbox.disable_safe_mode
rbox.execute 'du -sh *'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM