识相 is informal and commonly used in Cantonese-influenced Mandarin (especially in Hong Kong and southern China). It can be used as a mild warning:
识相就快走 (if you know what's good for you, leave quickly). It implies social intelligence — knowing when to act and when to back off.