Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用Sys.chmodR 中的函数通过“其他”切换可读性,即相当于:
Sys.chmod
chmod o+r myfile chmod o-r myfile
我特别想不理会模式的其他部分。
chmod o+r:
mod <- file.info('tmp.txt')$mode Sys.chmod('tmp.txt', mod|4)
chmod 或:
mod <- file.info('tmp.txt')$mode Sys.chmod('tmp.txt', mod&!as.octmode(4))