Linux locate command copy path to clipboard

view story

http://stackoverflow.com – hey for example I am going to change vhosts.conf I first do locate it gives me multiple paths (my correct result is last one) (/private/etc/apache2/extra/httpd-vhosts.conf) then I select it with mouse and then write vim /private/etc/apache2/extra/httpd-vhosts.conf to edit. but what I want to do is locate the file and copy path to clipboard. so in next line I'll only write vim and ctrl +v . (HowTos)