Skip to main content
refining the grep command
Source Link
Graham Perrin
  • 7.8k
  • 14
  • 83
  • 246

First question

Is there a reason why Music will not show?

One of the following commands, run in Terminal, might help towards an explanation.

defaults read com.apple.sidebarlists | grep Music

– expect a match of some sort. If no match, it'll be difficult to discover/guess how the entry was lost.

defaults read com.apple.sidebarlists favorites | grep -B 2 Visibility

Here, with Mountain Lion, I find Visibility = NeverVisible for some things – but not for the thing that I most recently removed from the sidebar, which leaves me wondering about .plist files that are used for preferred removals in Lion and Mountain Lion.

Based on commentary, revisions and other answers

If using the File menu to add the volume to the sidebar does not allow the volume to appear under DEVICES, we might view this as a bug in the OS.

The following command should reveal detail of the five entries for Music:

defaults read com.apple.sidebarlists | grep -B 3 -A 2 Music

Is there a reason why Music will not show?

One of the following commands, run in Terminal, might help towards an explanation.

defaults read com.apple.sidebarlists | grep Music

– expect a match of some sort. If no match, it'll be difficult to discover/guess how the entry was lost.

defaults read com.apple.sidebarlists favorites | grep -B 2 Visibility

Here, with Mountain Lion, I find Visibility = NeverVisible for some things – but not for the thing that I most recently removed from the sidebar, which leaves me wondering about .plist files that are used for preferred removals in Lion and Mountain Lion.

First question

Is there a reason why Music will not show?

One of the following commands, run in Terminal, might help towards an explanation.

defaults read com.apple.sidebarlists | grep Music

– expect a match of some sort. If no match, it'll be difficult to discover/guess how the entry was lost.

defaults read com.apple.sidebarlists favorites | grep -B 2 Visibility

Here, with Mountain Lion, I find Visibility = NeverVisible for some things – but not for the thing that I most recently removed from the sidebar, which leaves me wondering about .plist files that are used for preferred removals in Lion and Mountain Lion.

Based on commentary, revisions and other answers

If using the File menu to add the volume to the sidebar does not allow the volume to appear under DEVICES, we might view this as a bug in the OS.

The following command should reveal detail of the five entries for Music:

defaults read com.apple.sidebarlists | grep -B 3 -A 2 Music
`Visibility = NeverVisible` is a mystery to me.
Source Link
Graham Perrin
  • 7.8k
  • 14
  • 83
  • 246

Is there a reason why Music will not show?

One of the following commands, run in Terminal, might help towards an explanation.

defaults read com.apple.sidebarlists | grep Music

– expect a match of some sort. If no match, it'll be difficult to discover/guess how the entry was lost.

defaults read com.apple.sidebarlists favorites | grep -B 2 Visibility

Here, with Mountain if youLion, I find Visibility = NeverVisible for the entrysome things – but not for Music, then (as others suggest) it's possible that the entry was inadvertently dragged awaything that I most recently removed from the sidebar, which leaves me wondering about .plist files that are used for preferred removals in Lion and Mountain Lion.

Is there a reason why Music will not show?

One of the following commands, run in Terminal, might help towards an explanation.

defaults read com.apple.sidebarlists | grep Music

– expect a match of some sort. If no match, it'll be difficult to discover/guess how the entry was lost.

defaults read com.apple.sidebarlists favorites | grep -B 2 Visibility

 if you find Visibility = NeverVisible for the entry for Music, then (as others suggest) it's possible that the entry was inadvertently dragged away from the sidebar.

Is there a reason why Music will not show?

One of the following commands, run in Terminal, might help towards an explanation.

defaults read com.apple.sidebarlists | grep Music

– expect a match of some sort. If no match, it'll be difficult to discover/guess how the entry was lost.

defaults read com.apple.sidebarlists favorites | grep -B 2 Visibility

Here, with Mountain Lion, I find Visibility = NeverVisible for some things – but not for the thing that I most recently removed from the sidebar, which leaves me wondering about .plist files that are used for preferred removals in Lion and Mountain Lion.

Source Link
Graham Perrin
  • 7.8k
  • 14
  • 83
  • 246

Is there a reason why Music will not show?

One of the following commands, run in Terminal, might help towards an explanation.

defaults read com.apple.sidebarlists | grep Music

– expect a match of some sort. If no match, it'll be difficult to discover/guess how the entry was lost.

defaults read com.apple.sidebarlists favorites | grep -B 2 Visibility

– if you find Visibility = NeverVisible for the entry for Music, then (as others suggest) it's possible that the entry was inadvertently dragged away from the sidebar.