命令參數(shù)
實(shí)例
chmod +x /home/user/bin/node-echo.js 賦予文件執(zhí)行權(quán)限
權(quán)限相關(guān)知識
權(quán)限中的@的含義,表示系統(tǒng)存儲的一些meta信息,可以xattr
命令查詢
xattr命令
The xattr command can be used to display, modify or remove the extended attributes of one or more files, including directories and symbolic links. **Extended attributes are arbitrary metadata stored with a file, but separate from the filesystem attributes (such as modification time or file size). ** The metadata is often a null-terminated UTF-8 string, but can also be arbitrary binary data.
自己的一些探索:
上面圖片中的@@@文件和test.textClipping文件有一個(gè)共同的metaData:com.apple.metadata:_kMDItemUserTags
巴比。
這是什么呢?
這是因?yàn)槲医o兩個(gè)文件都添加了相同tag(mac獨(dú)有)。上面的試驗(yàn)也表明不加這個(gè)標(biāo)簽茶凳,就不會有這條metaData.
疑惑
設(shè)置系統(tǒng)默認(rèn)建立文件與目錄的權(quán)限:
vim /etc/bashrc
(1)一般用戶建立文件權(quán)限:666-002=664;目錄權(quán)限777-002=775播揪;
(2)root用戶建立文件權(quán)限:666-022=644贮喧;目錄權(quán)限777-022=755。
并不明白為什么猪狈?箱沦??雇庙?谓形?灶伊??寒跳?聘萨?