title: How to connect & perform Sync with Perforce on Mac
body: <p>I am trying to access perforce and perform Sync operation from  command line on Mac machine OS x 10.8.5</p>
  
  <p>Can any one tell me how to access perforce for command line. </p>
  
  <p>I have placed  p4 client in /usr/bin directory,</p>
  
  <p>From Terminal when i execute command :  P4  or p4 help, im getting below error message.</p>
  
  <p>Perforce client error:
  Connect to server failed; check $P4PORT.
  TCP connect to perforce:1666 failed.
  nodename not servname provided, or not known</p>
  
  <p>Step by step approach to set up Perforce,  will be greatly appreciated</p>
  
  <p>Note: P4V gui version is working fine, I need to execute Sync command from Command line  for bash script.</p>
  
  <p>Thanks in advance.</p>