Skip to main content
Replace output of defaults with output of /usr/bin/defaults
Source Link
Stefan Schmidt
  • 383
  • 1
  • 3
  • 11
$ /usr/bin/defaults write ~/foobar.plist foo bar
$ /usr/bin/defaults read ~/foobar.plist foo
bar
$ /usr/bin/defaults write ~/Downloads/foobar.plist foo bar
$ /usr/bin/defaults read ~/Downloads/foobar.plist foo
bar
$ /usr/bin/defaults write ~/Documents/foobar.plist foo bar
$ /usr/bin/defaults read ~/Documents/foobar.plist foo
bar
$ /usr/bin/defaults write ~/Desktop/foobar.plist foo bar
$ /usr/bin/defaults read ~/Desktop/foobar.plist foo
bar
$ defaults write ~/foobar.plist foo bar
$ defaults read ~/foobar.plist foo
bar
$ defaults write ~/Downloads/foobar.plist foo bar
$ defaults read ~/Downloads/foobar.plist foo
bar
$ defaults write ~/Documents/foobar.plist foo bar
$ defaults read ~/Documents/foobar.plist foo
bar
$ defaults write ~/Desktop/foobar.plist foo bar
$ defaults read ~/Desktop/foobar.plist foo
bar
$ /usr/bin/defaults write ~/foobar.plist foo bar
$ /usr/bin/defaults read ~/foobar.plist foo
bar
$ /usr/bin/defaults write ~/Downloads/foobar.plist foo bar
$ /usr/bin/defaults read ~/Downloads/foobar.plist foo
bar
$ /usr/bin/defaults write ~/Documents/foobar.plist foo bar
$ /usr/bin/defaults read ~/Documents/foobar.plist foo
bar
$ /usr/bin/defaults write ~/Desktop/foobar.plist foo bar
$ /usr/bin/defaults read ~/Desktop/foobar.plist foo
bar
replaced output of xattr with output of /usr/bin/xattr
Source Link
Stefan Schmidt
  • 383
  • 1
  • 3
  • 11
$ /usr/bin/xattr -l ~/foobar.plist
$ /usr/bin/xattr -l ~/Documents/foobar.plist
com.apple.macl:
0000 00000000  04 00 5B E7 7B 97 C0 D1 49 FF AD 34 CC 5B C3 B1    |..[.{...I..4.[..|
0010 00000010  FC BF 00 00 00 00 00 00 00 00 00 00 00 00 00 00    |................|
0020 00000020  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    |................|
0030 00000030  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    |................|
0040 00000040  00 00 00 00 00 00 00 00                            |........|
00000048

$ /usr/bin/xattr -l ~/Downloads/foobar.plist
com.apple.macl:
0000 00000000  04 00 5B E7 7B 97 C0 D1 49 FF AD 34 CC 5B C3 B1    |..[.{...I..4.[..|
0010 00000010  FC BF 00 00 00 00 00 00 00 00 00 00 00 00 00 00    |................|
0020 00000020  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    |................|
0030 00000030  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    |................|
0040 00000040  00 00 00 00 00 00 00 00                            |........|
00000048
$ /usr/bin/xattr -l ~/Desktop/foobar.plist
com.apple.macl:
0000 00000000  04 00 5B E7 7B 97 C0 D1 49 FF AD 34 CC 5B C3 B1    |..[.{...I..4.[..|
0010 00000010  FC BF 04 00 E7 04 31 F1 19 3B 41 2D BA 36 1D 05    |......1..;A-.6..|
0020 00000020  19 2F D1 0F 00 00 00 00 00 00 00 00 00 00 00 00    |./..............|
0030 00000030  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    |................|
0040 00000040  00 00 00 00 00 00 00 00                            |........|
00000048
$ xattr -l ~/foobar.plist
$ xattr -l ~/Documents/foobar.plist
com.apple.macl:
0000   04 00 5B E7 7B 97 C0 D1 49 FF AD 34 CC 5B C3 B1    ..[.{...I..4.[..
0010   FC BF 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0020   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0030   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0040   00 00 00 00 00 00 00 00                            ........

$ xattr -l ~/Downloads/foobar.plist
com.apple.macl:
0000   04 00 5B E7 7B 97 C0 D1 49 FF AD 34 CC 5B C3 B1    ..[.{...I..4.[..
0010   FC BF 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0020   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0030   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0040   00 00 00 00 00 00 00 00                            ........
$ xattr -l ~/Desktop/foobar.plist
com.apple.macl:
0000   04 00 5B E7 7B 97 C0 D1 49 FF AD 34 CC 5B C3 B1    ..[.{...I..4.[..
0010   FC BF 04 00 E7 04 31 F1 19 3B 41 2D BA 36 1D 05    ......1..;A-.6..
0020   19 2F D1 0F 00 00 00 00 00 00 00 00 00 00 00 00    ./..............
0030   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0040   00 00 00 00 00 00 00 00                            ........
$ /usr/bin/xattr -l ~/foobar.plist
$ /usr/bin/xattr -l ~/Documents/foobar.plist
com.apple.macl:
00000000  04 00 5B E7 7B 97 C0 D1 49 FF AD 34 CC 5B C3 B1  |..[.{...I..4.[..|
00000010  FC BF 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
00000020  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
00000030  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
00000040  00 00 00 00 00 00 00 00                          |........|
00000048

$ /usr/bin/xattr -l ~/Downloads/foobar.plist
com.apple.macl:
00000000  04 00 5B E7 7B 97 C0 D1 49 FF AD 34 CC 5B C3 B1  |..[.{...I..4.[..|
00000010  FC BF 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
00000020  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
00000030  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
00000040  00 00 00 00 00 00 00 00                          |........|
00000048
$ /usr/bin/xattr -l ~/Desktop/foobar.plist
com.apple.macl:
00000000  04 00 5B E7 7B 97 C0 D1 49 FF AD 34 CC 5B C3 B1  |..[.{...I..4.[..|
00000010  FC BF 04 00 E7 04 31 F1 19 3B 41 2D BA 36 1D 05  |......1..;A-.6..|
00000020  19 2F D1 0F 00 00 00 00 00 00 00 00 00 00 00 00  |./..............|
00000030  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
00000040  00 00 00 00 00 00 00 00                          |........|
00000048
Fixed grammar
Source Link
Stefan Schmidt
  • 383
  • 1
  • 3
  • 11

IIn some way that I cannot remember I created another plist file that also had the com.apple.macl attribute but with a different value. The value of com.apple.macl starts with 04 00 5B E7 7B 97 C0 D1 49 FF AD 34 CC 5B C3 B1 FC BF and the rest is zeros.

Update

It seems when using defaults write to create the property list file the key is always found.

$ defaults write ~/foobar.plist foo bar
$ defaults read ~/foobar.plist foo
bar
$ defaults write ~/Downloads/foobar.plist foo bar
$ defaults read ~/Downloads/foobar.plist foo
bar
$ defaults write ~/Documents/foobar.plist foo bar
$ defaults read ~/Documents/foobar.plist foo
bar
$ defaults write ~/Desktop/foobar.plist foo bar
$ defaults read ~/Desktop/foobar.plist foo
bar

As above the extended attribute com.apple.macl is not present when the file is created in the home folder.

$ xattr -l ~/foobar.plist

com.apple.macl gets assigned 04 00 5B E7 7B 97 C0 D1 49 FF AD 34 CC 5B C3 B1 FC BF when the file is created in the Documents or Downloads folder.

$ xattr -l ~/Documents/foobar.plist
com.apple.macl:
0000   04 00 5B E7 7B 97 C0 D1 49 FF AD 34 CC 5B C3 B1    ..[.{...I..4.[..
0010   FC BF 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0020   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0030   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0040   00 00 00 00 00 00 00 00                            ........

$ xattr -l ~/Downloads/foobar.plist
com.apple.macl:
0000   04 00 5B E7 7B 97 C0 D1 49 FF AD 34 CC 5B C3 B1    ..[.{...I..4.[..
0010   FC BF 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0020   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0030   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0040   00 00 00 00 00 00 00 00                            ........

com.apple.macl gets assigned 04 00 5B E7 7B 97 C0 D1 49 FF AD 34 CC 5B C3 B1 FC BF 04 00 E7 04 31 F1 19 3B 41 2D BA 36 1D 05 19 2F D1 0F when the file is created in the Desktop folder.

$ xattr -l ~/Desktop/foobar.plist
com.apple.macl:
0000   04 00 5B E7 7B 97 C0 D1 49 FF AD 34 CC 5B C3 B1    ..[.{...I..4.[..
0010   FC BF 04 00 E7 04 31 F1 19 3B 41 2D BA 36 1D 05    ......1..;A-.6..
0020   19 2F D1 0F 00 00 00 00 00 00 00 00 00 00 00 00    ./..............
0030   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0040   00 00 00 00 00 00 00 00                            ........

I some way that I cannot remember I created another plist file that also had the com.apple.macl attribute but with a different value. The value of com.apple.macl starts with 04 00 5B E7 7B 97 C0 D1 49 FF AD 34 CC 5B C3 B1 FC BF and the rest is zeros.

In some way that I cannot remember I created another plist file that also had the com.apple.macl attribute but with a different value. The value of com.apple.macl starts with 04 00 5B E7 7B 97 C0 D1 49 FF AD 34 CC 5B C3 B1 FC BF and the rest is zeros.

Update

It seems when using defaults write to create the property list file the key is always found.

$ defaults write ~/foobar.plist foo bar
$ defaults read ~/foobar.plist foo
bar
$ defaults write ~/Downloads/foobar.plist foo bar
$ defaults read ~/Downloads/foobar.plist foo
bar
$ defaults write ~/Documents/foobar.plist foo bar
$ defaults read ~/Documents/foobar.plist foo
bar
$ defaults write ~/Desktop/foobar.plist foo bar
$ defaults read ~/Desktop/foobar.plist foo
bar

As above the extended attribute com.apple.macl is not present when the file is created in the home folder.

$ xattr -l ~/foobar.plist

com.apple.macl gets assigned 04 00 5B E7 7B 97 C0 D1 49 FF AD 34 CC 5B C3 B1 FC BF when the file is created in the Documents or Downloads folder.

$ xattr -l ~/Documents/foobar.plist
com.apple.macl:
0000   04 00 5B E7 7B 97 C0 D1 49 FF AD 34 CC 5B C3 B1    ..[.{...I..4.[..
0010   FC BF 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0020   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0030   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0040   00 00 00 00 00 00 00 00                            ........

$ xattr -l ~/Downloads/foobar.plist
com.apple.macl:
0000   04 00 5B E7 7B 97 C0 D1 49 FF AD 34 CC 5B C3 B1    ..[.{...I..4.[..
0010   FC BF 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0020   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0030   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0040   00 00 00 00 00 00 00 00                            ........

com.apple.macl gets assigned 04 00 5B E7 7B 97 C0 D1 49 FF AD 34 CC 5B C3 B1 FC BF 04 00 E7 04 31 F1 19 3B 41 2D BA 36 1D 05 19 2F D1 0F when the file is created in the Desktop folder.

$ xattr -l ~/Desktop/foobar.plist
com.apple.macl:
0000   04 00 5B E7 7B 97 C0 D1 49 FF AD 34 CC 5B C3 B1    ..[.{...I..4.[..
0010   FC BF 04 00 E7 04 31 F1 19 3B 41 2D BA 36 1D 05    ......1..;A-.6..
0020   19 2F D1 0F 00 00 00 00 00 00 00 00 00 00 00 00    ./..............
0030   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0040   00 00 00 00 00 00 00 00                            ........
Source Link
Stefan Schmidt
  • 383
  • 1
  • 3
  • 11
Loading