What this command would have done is list all files (ls -la) within the root path of last Time Machine snapshot of your Macintosh HD disk ("$(tmutil latestbackup)/Macintosh HD") and then show only a result if the file “.VolumeIcon” is on that list.
What you can do is use this Terminal command to show all hidden files in Finder. This command will activate a setting that you cannot enable in the user interface.
Code:
defaults write com.apple.finder AppleShowAllFiles -bool true
After entering this command, you should relaunch Finder by holding the option key and right-clicking on the Finder icon in the Dock, then select “Relaunch”.
Then you go to your Time Machine disk in Finder and traverse the path until you reach a Macintosh HD folder. There should be a file called .VolumeIcon.icns there (in the root of the Macintosh HD folder). Simply copy this file to your desktop and rename it to remove the initial full-stop. Then you right-click on your Macintosh HD volume, select "Get Info" and drag the icon from your desktop to the top-left icon on the Get Info window.
Finally, you can hide the hidden files again with this command:
Code:
defaults delete com.apple.finder AppleShowAllFiles