mac下用xattr命令来删除文件的扩展属性

来源:互联网 发布:mac版本老装不了xcode 编辑:程序博客网 时间:2024/05/17 23:44

mac下发现不能用记事本打开文本文件,ls -la 发现格式后面有个@


wenke-mini:changeServer wenke$ ls -latotal 144drwxr-xr-x  20 wenke  staff    680  6  4 16:37 .drwxr-xr-x  22 wenke  staff    748  6  3 16:54 ..-rw-r--r--@  1 wenke  staff  39940  6  4 16:37 .DS_Storedrwxr-xr-x   8 wenke  staff    272  3 27 11:44 103drwxr-xr-x   6 wenke  staff    204  3 27 13:56 110drwxr-xr-x   7 wenke  staff    238  3 27 11:44 215drwxr-xr-x   7 wenke  staff    238  6  4 16:37 215_110drwxr-xr-x   8 wenke  staff    272  5 30 13:38 225drwxr-xr-x   8 wenke  staff    272  3 27 11:44 225_110-rwxr-xr-x   1 wenke  staff    950  4  2 18:39 changeServerTo110-rwxr-xr-x   1 wenke  staff   1351  4  2 15:46 changeServerTo215-rwxr-xr-x@  1 wenke  staff   1474  5  2 13:10 changeServerTo225-rwxr-xr-x   1 wenke  staff    960  4 17 16:31 changeServerTo225_110-rwxr-xr-x@  1 wenke  staff   1474  5  6 20:26 changeServerToHome-rwxr-xr-x   1 wenke  staff    933  4 17 16:31 changeServerTos1-rwxr-xr-x   1 wenke  staff    936  4  2 18:39 changeServerTos1_pop


goole了一下,用xattr命令可以查看和删除这个@.

wenke-mini:changeServer wenke$ xattr -l *changeServerTo225: com.apple.quarantine: 0002;53589829;QQ;changeServerToHome: com.apple.quarantine: 0042;53589829;QQ;


wenke-mini:changeServer wenke$ xattr -c changeServerTo225wenke-mini:changeServer wenke$ xattr -c changeServerToHome

wenke-mini:changeServer wenke$ ls -ltotal 64drwxr-xr-x  8 wenke  staff   272  3 27 11:44 103drwxr-xr-x  6 wenke  staff   204  3 27 13:56 110drwxr-xr-x  7 wenke  staff   238  3 27 11:44 215drwxr-xr-x  7 wenke  staff   238  6  4 16:37 215_110drwxr-xr-x  8 wenke  staff   272  5 30 13:38 225drwxr-xr-x  8 wenke  staff   272  3 27 11:44 225_110-rwxr-xr-x  1 wenke  staff   950  4  2 18:39 changeServerTo110-rwxr-xr-x  1 wenke  staff  1351  4  2 15:46 changeServerTo215-rwxr-xr-x  1 wenke  staff  1474  5  2 13:10 changeServerTo225-rwxr-xr-x  1 wenke  staff   960  4 17 16:31 changeServerTo225_110-rwxr-xr-x@ 1 wenke  staff  1474  5  6 20:26 changeServerToHome-rwxr-xr-x  1 wenke  staff   933  4 17 16:31 changeServerTos1-rwxr-xr-x  1 wenke  staff   936  4  2 18:39 changeServerTos1_pop



0 0